public class JavaScriptObjectContainer
extends java.lang.Object
GenericJavaScriptObject
Modifier | Constructor and Description |
---|---|
protected |
JavaScriptObjectContainer()
Creates the object instantiating new java script object.
|
protected |
JavaScriptObjectContainer(GenericJavaScriptObject javaScriptObject)
Creates the object wrapping another java script object.
|
Modifier and Type | Method and Description |
---|---|
protected JsDoubleArrayList |
checkAndGetDoubleValues(Key key,
boolean isArray)
Checks if the value is stored as array (doubles) into the object and accordingly the element.
|
protected JsStringArrayList |
checkAndGetEnumValues(Key key,
boolean isArray)
Checks if the value is stored as array (EnumValue) into the object and accordingly the element.
|
protected JsIntegerArrayList |
checkAndGetIntegerValues(Key key,
boolean isArray)
Checks if the value is stored as array (integers) into the object and accordingly the element.
|
protected JsStringArrayList |
checkAndGetStringValues(Key key,
boolean isArray)
Checks if the value is stored as array (strings) into the object and accordingly the element.
|
protected boolean |
checkAndSetDoubleValues(Key key,
JsDoubleArrayList values)
Checks if it should set an array list (doubles) or a single value for a specific property.
|
protected <T extends Key> |
checkAndSetEnumValues(Key key,
JsEnumValueArrayList<T> values)
Checks if it should set an array list (EnumValues) or a single value for a specific property.
|
protected boolean |
checkAndSetIntegerValues(Key key,
JsIntegerArrayList values)
Checks if it should set an array list (integers) or a single value for a specific property.
|
protected boolean |
checkAndSetStringValues(Key key,
JsStringArrayList values)
Checks if it should set an array list (strings) or a single value for a specific property.
|
protected JsDoubleArrayList |
getDoubleArray(Key key)
Returns a value (double array list) into embedded JavaScript object at specific property.
|
protected JsIntegerArrayList |
getIntegerArray(Key key)
Returns a value (integer array list) into embedded JavaScript object at specific property.
|
protected GenericJavaScriptObject |
getJavaScriptObject()
Returns the JavaScript object instance
|
protected java.util.List<GenericJavaScriptObject> |
getObjectArray(Key key)
Returns a value (generic java script object array list) into embedded JavaScript object at specific property.
|
protected JsStringArrayList |
getStringArray(Key key)
Returns a value (string array list) into embedded JavaScript object at specific property.
|
protected <T extends com.google.gwt.core.client.JavaScriptObject> |
getValue(Key key)
Returns a value (JavaScript Object) into embedded JavaScript object at specific property.
|
protected boolean |
getValue(Key key,
boolean defaultValue)
Returns a value (boolean) into embedded JavaScript object at specific property.
|
protected <T extends Key> |
getValue(Key key,
java.lang.Class<T> clazz,
T defaultValue)
Returns a value (key) into embedded JavaScript object at specific property.
|
protected java.util.Date |
getValue(Key key,
java.util.Date defaultValue)
Returns a value (date) into embedded JavaScript object at specific property.
|
protected double |
getValue(Key key,
double defaultValue)
Returns a value (double) into embedded JavaScript object at specific property.
|
protected int |
getValue(Key key,
int defaultValue)
Returns a value (int) into embedded JavaScript object at specific property.
|
protected java.lang.String |
getValue(Key key,
java.lang.String defaultValue)
Returns a value (string) into embedded JavaScript object at specific property.
|
protected boolean |
has(Key... keys)
Returns true if the embedded JavaScript object contains an element at all properties.
|
protected boolean |
has(Key key)
Returns true if the embedded JavaScript object contains an element at specific property.
|
protected boolean |
hasToBeRegistered(java.lang.Object object,
Key... keys)
Returns true if the object is present into embedded JavaScript object.
|
protected boolean |
isEmpty()
Returns true if the embedded JavaScript object contains no elements.
|
protected java.util.List<Key> |
keys()
Returns the list of properties names of the object.
|
protected void |
remove(Key... keys)
Removes a set of elements (by keys) from the embedded JavaScript object.
|
protected void |
remove(Key key)
Removes an element (by key) from the embedded JavaScript object.
|
protected void |
removeIfExists(Key key)
Removes an element (by key) from the embedded JavaScript object if exists.
|
protected void |
setDoubleArray(Key key,
JsDoubleArrayList list)
Sets a value (double array list) into embedded JavaScript object at specific property.
|
protected <T extends Key> |
setEnumValueArray(Key key,
JsEnumValueArrayList<T> list)
Sets a value (EnumValue array list) into embedded JavaScript object at specific property.
|
protected void |
setIntegerArray(Key key,
JsIntegerArrayList list)
Sets a value (int array list) into embedded JavaScript object at specific property.
|
protected <T extends GenericJavaScriptObject> |
setObjectArray(Key key,
JsObjectArrayList<T> list)
Sets a value (JavaScript array list) into embedded JavaScript object at specific property.
|
protected void |
setStringArray(Key key,
JsStringArrayList list)
Sets a value (string array list) into embedded JavaScript object at specific property.
|
protected <E> void |
setValue(Key key,
AbstractList<E> container)
Sets a value (JavaScript object container array list) into embedded JavaScript object at specific property.
|
protected void |
setValue(Key key,
boolean value)
Sets a value (boolean) into embedded JavaScript object at specific property.
|
protected void |
setValue(Key key,
java.util.Date value)
Sets a value (date) into embedded JavaScript object at specific property.
|
protected void |
setValue(Key key,
double value)
Sets a value (double) into embedded JavaScript object at specific property.
|
protected void |
setValue(Key key,
int value)
Sets a value (int) into embedded JavaScript object at specific property.
|
protected void |
setValue(Key key,
com.google.gwt.core.client.JavaScriptObject value)
Sets a value (JavaScript Object) into embedded JavaScript object at specific property.
|
protected void |
setValue(Key key,
JavaScriptObjectContainer container)
Sets a value (JavaScript object container) into embedded JavaScript object at specific property.
|
protected void |
setValue(Key key,
java.lang.String value)
Sets a value (string) into embedded JavaScript object at specific property.
|
protected <T extends Key> |
setValue(Key key,
T value)
Sets a value (EnumValue) into embedded JavaScript object at specific property.
|
java.lang.String |
toString() |
protected JavaScriptFieldType |
type(Key key)
Returns the java script type of the property.
|
protected JavaScriptObjectContainer()
protected JavaScriptObjectContainer(GenericJavaScriptObject javaScriptObject)
javaScriptObject
- java script object to be wrappedprotected final GenericJavaScriptObject getJavaScriptObject()
protected boolean isEmpty()
true
if the embedded JavaScript object contains no elements.protected boolean has(Key key)
key
- key of the property of JavaScript object.true
if the embedded JavaScript object contains an element at specific propertyKey
protected boolean has(Key... keys)
keys
- set of keys of the properties of JavaScript object.true
if the embedded JavaScript object contains an element at all properties.Key
protected java.util.List<Key> keys()
protected JavaScriptFieldType type(Key key)
key
- name of the java script property.protected void removeIfExists(Key key)
key
- key of the property of JavaScript object.Key
protected void remove(Key key)
key
- key of the property of JavaScript object.Key
protected void remove(Key... keys)
keys
- set of keys of the properties of JavaScript object.Key
protected boolean hasToBeRegistered(java.lang.Object object, Key... keys)
object
- object to be setkeys
- set of keys of the properties of JavaScript object.true
if the object is NOT present.Key
protected void setValue(Key key, int value)
key
- key of the property of JavaScript object.value
- value to be setKey
protected int getValue(Key key, int defaultValue)
key
- key of the property of JavaScript object.defaultValue
- default value if the property is missingKey
protected void setValue(Key key, double value)
key
- key of the property of JavaScript object.value
- value to be setKey
protected double getValue(Key key, double defaultValue)
key
- key of the property of JavaScript object.defaultValue
- default value if the property is missingKey
protected void setValue(Key key, boolean value)
key
- key of the property of JavaScript object.value
- value to be setKey
protected boolean getValue(Key key, boolean defaultValue)
key
- key of the property of JavaScript object.defaultValue
- default value if the property is missingKey
protected java.lang.String getValue(Key key, java.lang.String defaultValue)
key
- key of the property of JavaScript object.defaultValue
- default value if the property is missingKey
protected void setValue(Key key, java.lang.String value)
key
- key of the property of JavaScript object.value
- value to be setKey
protected java.util.Date getValue(Key key, java.util.Date defaultValue)
key
- key of the property of JavaScript object.defaultValue
- default value if the property is missingKey
protected void setValue(Key key, java.util.Date value)
key
- key of the property of JavaScript object.value
- value to be setKey
protected <T extends com.google.gwt.core.client.JavaScriptObject> T getValue(Key key)
T
- type of java script objectkey
- key of the property of JavaScript object.null
if not thereKey
,
JavaScriptObject
protected void setValue(Key key, com.google.gwt.core.client.JavaScriptObject value)
key
- key of the property of JavaScript object.value
- value to be setJavaScriptObject
,
Key
protected <T extends Key> T getValue(Key key, java.lang.Class<T> clazz, T defaultValue)
T
- type of keykey
- key of the property of JavaScript object.clazz
- class of object to get all enumeration valuesdefaultValue
- default value if the property is missingKey
protected <T extends Key> void setValue(Key key, T value)
T
- type of keykey
- key of the property of JavaScript object.value
- value to be setKey
protected final void setDoubleArray(Key key, JsDoubleArrayList list)
key
- key of the property of JavaScript object.list
- value to be setKey
,
JsDoubleArrayList
protected final JsDoubleArrayList getDoubleArray(Key key)
key
- key of the property of JavaScript object.Key
,
JsDoubleArrayList
protected boolean checkAndSetDoubleValues(Key key, JsDoubleArrayList values)
key
- key of the property of JavaScript object.values
- array list to settrue
if the complete list has been set otherwise falseJsDoubleArrayList
protected JsDoubleArrayList checkAndGetDoubleValues(Key key, boolean isArray)
key
- key of the property of JavaScript object.isArray
- true
if the value has been stored as an arrayJsDoubleArrayList
protected final void setStringArray(Key key, JsStringArrayList list)
key
- key of the property of JavaScript object.list
- value to be setKey
,
JsStringArrayList
protected final JsStringArrayList getStringArray(Key key)
key
- key of the property of JavaScript object.Key
,
JsStringArrayList
protected boolean checkAndSetStringValues(Key key, JsStringArrayList values)
key
- key of the property of JavaScript object.values
- array list to settrue
if the complete list has been set otherwise falseJsStringArrayList
protected JsStringArrayList checkAndGetStringValues(Key key, boolean isArray)
key
- key of the property of JavaScript object.isArray
- true
if the value has been stored as an arrayJsStringArrayList
protected final <T extends Key> void setEnumValueArray(Key key, JsEnumValueArrayList<T> list)
T
- type of keykey
- key of the property of JavaScript object.list
- value to be setKey
,
JsEnumValueArrayList
protected <T extends Key> boolean checkAndSetEnumValues(Key key, JsEnumValueArrayList<T> values)
T
- type of keykey
- key of the property of JavaScript object.values
- array list to settrue
if the complete list has been set otherwise falseJsEnumValueArrayList
protected JsStringArrayList checkAndGetEnumValues(Key key, boolean isArray)
key
- key of the property of JavaScript object.isArray
- true
if the value has been stored as an arrayJsStringArrayList
protected final void setIntegerArray(Key key, JsIntegerArrayList list)
key
- key of the property of JavaScript object.list
- value to be setKey
,
JsIntegerArrayList
protected final JsIntegerArrayList getIntegerArray(Key key)
key
- key of the property of JavaScript object.Key
,
JsIntegerArrayList
protected boolean checkAndSetIntegerValues(Key key, JsIntegerArrayList values)
key
- key of the property of JavaScript object.values
- array list to settrue
if the complete list has been set otherwise falseJsIntegerArrayList
protected JsIntegerArrayList checkAndGetIntegerValues(Key key, boolean isArray)
key
- key of the property of JavaScript object.isArray
- true
if the value has been stored as an arrayJsIntegerArrayList
protected final <T extends GenericJavaScriptObject> void setObjectArray(Key key, JsObjectArrayList<T> list)
T
- type of java script objectkey
- key of the property of JavaScript object.list
- value to be setKey
,
JsObjectArrayList
protected void setValue(Key key, JavaScriptObjectContainer container)
key
- key of the property of JavaScript object.container
- value to be setKey
,
JavaScriptObjectContainer
protected <E> void setValue(Key key, AbstractList<E> container)
E
- type of java script objectkey
- key of the property of JavaScript object.container
- value to be setKey
,
AbstractList
protected java.util.List<GenericJavaScriptObject> getObjectArray(Key key)
key
- key of the property of JavaScript object.public java.lang.String toString()
toString
in class java.lang.Object