All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.rabidgremlin.mutters.bot.ink.functions.FunctionDetails Maven / Gradle / Ivy

There is a newer version: 7.1.0
Show newest version
package com.rabidgremlin.mutters.bot.ink.functions;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

/*
 * Utility class to hold parsed ink function data.
 * 
 */
public class FunctionDetails
{
  /** The data string. */
  private String functionData;

  /** The data string parsed into params. */
  private Map functionParams;

  public FunctionDetails(String functionData)
  {  
    this.functionData = functionData;
  }

  public String getFunctionData()
  {
    return functionData;
  }

  public Map getFunctionParams()
  {
    if (functionParams == null)
    {
      return null;
    }

    return Collections.unmodifiableMap(functionParams);
  }

  public void addFunctionParams(String name, String value)
  {
    if (functionParams == null)
    {
      functionParams = new HashMap();
    }

    functionParams.put(name, value);
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy