Class JSONFunction

java.lang.Object
org.kordamp.json.JSONFunction
All Implemented Interfaces:
Serializable

public class JSONFunction extends Object implements Serializable
JSONFunction represents a javaScript function's text.
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • EMPTY_PARAM_ARRAY

      private static final String[] EMPTY_PARAM_ARRAY
      constant array for empty parameters
    • params

      private String[] params
      the parameters of this function
    • text

      private String text
      the text of this function
  • Constructor Details

    • JSONFunction

      public JSONFunction(String text)
      Constructs a JSONFunction with no parameters.
      Parameters:
      text - The text of the function
    • JSONFunction

      public JSONFunction(String[] params, String text)
      Constructs a JSONFunction with parameters.
      Parameters:
      params - The parameters of the function
      text - The text of the function
  • Method Details

    • parse

      public static JSONFunction parse(String str)
      Constructs a JSONFunction from a text representation
    • getParams

      public String[] getParams()
      Returns the parameters of this function.
    • getText

      public String getText()
      Reeturns the text of this function.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Returns the string representation of this function.
      Overrides:
      toString in class Object