net.sf.json
Class JSONFunction

java.lang.Object
  extended by net.sf.json.JSONFunction
All Implemented Interfaces:
Serializable

public class JSONFunction
extends Object
implements Serializable

JSONFunction represents a javaScript function's text.

Author:
Andres Almiray
See Also:
Serialized Form

Constructor Summary
JSONFunction(String text)
          Constructs a JSONFunction with no parameters.
JSONFunction(String[] params, String text)
          Constructs a JSONFunction with parameters.
 
Method Summary
 boolean equals(Object obj)
           
 String[] getParams()
          Returns the parameters of this function.
 String getText()
          Reeturns the text of this function.
 int hashCode()
           
static JSONFunction parse(String str)
          Constructs a JSONFunction from a text representation
 String toString()
          Returns the string representation of this function.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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 Detail

parse

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


equals

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

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

toString

public String toString()
Returns the string representation of this function.

Overrides:
toString in class Object