Package org.opencms.gwt.client.util
Class CmsJSONMap
- java.lang.Object
-
- com.google.gwt.core.client.JavaScriptObject
-
- org.opencms.gwt.client.util.CmsJSONMap
-
public final class CmsJSONMap extends com.google.gwt.core.client.JavaScriptObject
Class to create native JSON maps.- Since:
- 8.0.0
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
CmsJSONMap()
Not directly instantiable.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
containsKey(java.lang.String key)
Returns if the given key is present in the map.static CmsJSONMap
createJSONMap()
Creates a native javascript object to be used as a JSON map.boolean
getBoolean(java.lang.String key)
Returns the value to the given key.boolean[]
getBooleanArray(java.lang.String key)
Returns the value to the given key.double
getDouble(java.lang.String key)
Returns the value to the given key.double[]
getDoubleArray(java.lang.String key)
Returns the value to the given key.int
getInt(java.lang.String key)
Returns the value to the given key.int[]
getIntArray(java.lang.String key)
Returns the value to the given key.com.google.gwt.core.client.JavaScriptObject
getJavaScriptObject(java.lang.String key)
Returns the value to the given key.com.google.gwt.core.client.JavaScriptObject[]
getJavaScriptObjectArray(java.lang.String key)
Returns the value to the given key.java.lang.String
getString(java.lang.String key)
Returns the value to the given key.java.lang.String[]
getStringArray(java.lang.String key)
Returns the value to the given key.void
put(java.lang.String key, boolean value)
Puts the value into the map.void
put(java.lang.String key, boolean[] value)
Puts the value into the map.void
put(java.lang.String key, double value)
Puts the value into the map.void
put(java.lang.String key, double[] value)
Puts the value into the map.void
put(java.lang.String key, int value)
Puts the value into the map.void
put(java.lang.String key, int[] value)
Puts the value into the map.void
put(java.lang.String key, com.google.gwt.core.client.JavaScriptObject value)
Puts the value into the map.void
put(java.lang.String key, com.google.gwt.core.client.JavaScriptObject[] value)
Puts the value into the map.void
put(java.lang.String key, java.lang.String value)
Puts the value into the map.void
put(java.lang.String key, java.lang.String[] value)
Puts the value into the map.
-
-
-
Constructor Detail
-
CmsJSONMap
protected CmsJSONMap()
Not directly instantiable. All subclasses must also define a protected, empty, no-arg constructor.
-
-
Method Detail
-
createJSONMap
public static CmsJSONMap createJSONMap()
Creates a native javascript object to be used as a JSON map.- Returns:
- the JSON map
-
containsKey
public boolean containsKey(java.lang.String key)
Returns if the given key is present in the map.- Parameters:
key
- the key- Returns:
true
if the map contains the key
-
getBoolean
public boolean getBoolean(java.lang.String key)
Returns the value to the given key.- Parameters:
key
- the key- Returns:
- the value
-
getBooleanArray
public boolean[] getBooleanArray(java.lang.String key)
Returns the value to the given key.- Parameters:
key
- the key- Returns:
- the value
-
getDouble
public double getDouble(java.lang.String key)
Returns the value to the given key.- Parameters:
key
- the key- Returns:
- the value
-
getDoubleArray
public double[] getDoubleArray(java.lang.String key)
Returns the value to the given key.- Parameters:
key
- the key- Returns:
- the value
-
getInt
public int getInt(java.lang.String key)
Returns the value to the given key.- Parameters:
key
- the key- Returns:
- the value
-
getIntArray
public int[] getIntArray(java.lang.String key)
Returns the value to the given key.- Parameters:
key
- the key- Returns:
- the value
-
getJavaScriptObject
public com.google.gwt.core.client.JavaScriptObject getJavaScriptObject(java.lang.String key)
Returns the value to the given key.- Parameters:
key
- the key- Returns:
- the value
-
getJavaScriptObjectArray
public com.google.gwt.core.client.JavaScriptObject[] getJavaScriptObjectArray(java.lang.String key)
Returns the value to the given key.- Parameters:
key
- the key- Returns:
- the value
-
getString
public java.lang.String getString(java.lang.String key)
Returns the value to the given key.- Parameters:
key
- the key- Returns:
- the value
-
getStringArray
public java.lang.String[] getStringArray(java.lang.String key)
Returns the value to the given key.- Parameters:
key
- the key- Returns:
- the value
-
put
public void put(java.lang.String key, boolean value)
Puts the value into the map.- Parameters:
key
- the keyvalue
- the value
-
put
public void put(java.lang.String key, boolean[] value)
Puts the value into the map.- Parameters:
key
- the keyvalue
- the value
-
put
public void put(java.lang.String key, double value)
Puts the value into the map.- Parameters:
key
- the keyvalue
- the value
-
put
public void put(java.lang.String key, double[] value)
Puts the value into the map.- Parameters:
key
- the keyvalue
- the value
-
put
public void put(java.lang.String key, int value)
Puts the value into the map.- Parameters:
key
- the keyvalue
- the value
-
put
public void put(java.lang.String key, int[] value)
Puts the value into the map.- Parameters:
key
- the keyvalue
- the value
-
put
public void put(java.lang.String key, com.google.gwt.core.client.JavaScriptObject value)
Puts the value into the map.- Parameters:
key
- the keyvalue
- the value
-
put
public void put(java.lang.String key, com.google.gwt.core.client.JavaScriptObject[] value)
Puts the value into the map.- Parameters:
key
- the keyvalue
- the value
-
put
public void put(java.lang.String key, java.lang.String value)
Puts the value into the map.- Parameters:
key
- the keyvalue
- the value
-
put
public void put(java.lang.String key, java.lang.String[] value)
Puts the value into the map.- Parameters:
key
- the keyvalue
- the value
-
-