org.zkoss.json
Class JavaScriptValue

java.lang.Object
  extended by org.zkoss.json.JavaScriptValue
All Implemented Interfaces:
JSONAware

public class JavaScriptValue
extends java.lang.Object
implements JSONAware

Used to generate a snippet of the JavaScript code.

Since:
6.0.0
Author:
tomyeh

Constructor Summary
JavaScriptValue(java.lang.String js)
          Constructor
 
Method Summary
 boolean equals(java.lang.Object o)
           
 int hashCode()
           
 java.lang.String toJSONString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaScriptValue

public JavaScriptValue(java.lang.String js)
Constructor

Parameters:
js - the snippet of the JavaScript code. For example, "{what: 123, another: 'a'}". The content is generated directly to the AU response, so it must be a valid JavaScript code.
Method Detail

toJSONString

public java.lang.String toJSONString()
Specified by:
toJSONString in interface JSONAware
Returns:
JSON text

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object


Copyright © 2005-2011 Potix Corporation. All Rights Reserved. SourceForge.net Logo