Package snap.util

Class JSObject


public class JSObject extends JSValue
This JSValue subclass represents an object.
  • Constructor Details

    • JSObject

      public JSObject()
      Constructor.
  • Method Details

    • getKeyValues

      public Map<String,JSValue> getKeyValues()
      Returns the KeyValues.
    • getValueCount

      public int getValueCount()
      Returns the number of key values.
    • getValue

      public JSValue getValue(String aKey)
      Returns a value for a key.
    • setValue

      public void setValue(String aKey, JSValue aValue)
      Sets a value for key.
    • getNativeValue

      public Object getNativeValue(String aKey)
      Returns the native value for given key.
    • setNativeValue

      public void setNativeValue(String aKey, Object aValue)
      Sets a native value.
    • getStringValue

      public String getStringValue(String aKey)
      Returns the native value for given key.
    • getNative

      public Map<String,Object> getNative()
      Returns this JS object as a native object.
      Overrides:
      getNative in class JSValue
    • getAsMap

      public Map<String,Object> getAsMap()
      Returns the node as a map.