Package snap.util
Class JSArray
java.lang.Object
snap.util.JSValue
snap.util.JSArray
This JSValue subclass represents an array.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addNativeValue
(Object aValue) Add a native value.void
Add a value for key.void
Add a value for key.List<?>
Returns this JS object as a native object.getValue
(int anIndex) Returns a value at given index.Returns the value as String if type is String.int
Returns the number of values.Returns the values.Methods inherited from class snap.util.JSValue
equals, getValue, hashCode, readSource, setValue, toString, toStringCompacted
-
Constructor Details
-
JSArray
public JSArray()Constructor. -
JSArray
Constructor.
-
-
Method Details
-
getValues
Returns the values. -
getValueCount
public int getValueCount()Returns the number of values. -
getValue
Returns a value at given index. -
addValue
Add a value for key. -
addValue
Add a value for key. -
addNativeValue
Add a native value. -
getNative
Returns this JS object as a native object. -
getValueAsString
Returns the value as String if type is String.- Overrides:
getValueAsString
in classJSValue
-