public final class MutableDictionary extends Dictionary
Constructor and Description |
---|
MutableDictionary()
Initialize a new empty Dictionary object.
|
MutableDictionary(Map<String,Object> data)
Initializes a new CBLDictionary object with dictionary content.
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(String key) |
int |
count() |
MutableArray |
getArray(String key)
Get a property's value as a Array, which is a mapping object of an array value.
|
Blob |
getBlob(String key) |
boolean |
getBoolean(String key) |
Date |
getDate(String key) |
MutableDictionary |
getDictionary(String key)
Get a property's value as a Dictionary, which is a mapping object of an dictionary value.
|
double |
getDouble(String key) |
float |
getFloat(String key) |
int |
getInt(String key) |
List<String> |
getKeys() |
long |
getLong(String key) |
Number |
getNumber(String key) |
String |
getString(String key) |
Object |
getValue(String key) |
MutableDictionary |
remove(String key)
Removes the mapping for a key from this Dictionary
|
MutableDictionary |
setArray(String key,
Array value)
Set an Array object for the given key.
|
MutableDictionary |
setBlob(String key,
Blob value)
Set a Blob object for the given key.
|
MutableDictionary |
setBoolean(String key,
boolean value)
Set a boolean value for the given key.
|
MutableDictionary |
setData(Map<String,Object> data)
Set a dictionary as a content.
|
MutableDictionary |
setDate(String key,
Date value)
Set a Date object for the given key.
|
MutableDictionary |
setDictionary(String key,
Dictionary value)
Set a Dictionary object for the given key.
|
MutableDictionary |
setDouble(String key,
double value)
Set a double value for the given key.
|
MutableDictionary |
setFloat(String key,
float value)
Set a float value for the given key.
|
MutableDictionary |
setInt(String key,
int value)
Set an int value for the given key.
|
MutableDictionary |
setLong(String key,
long value)
Set a long value for the given key.
|
MutableDictionary |
setNumber(String key,
Number value)
Set a Number value for the given key.
|
MutableDictionary |
setString(String key,
String value)
Set a String value for the given key.
|
MutableDictionary |
setValue(String key,
Object value)
Set an object value by key.
|
Map<String,Object> |
toMap() |
contains, count, encodeTo, equals, getBlob, getBoolean, getDate, getDouble, getFloat, getInt, getKeys, getLong, getNumber, getString, getValue, hashCode, iterator, toMap, toMutable
getClass, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public MutableDictionary()
public MutableDictionary(Map<String,Object> data)
data
- the dictionary object.public MutableDictionary setData(Map<String,Object> data)
data
- the dictionary object.public MutableDictionary setValue(String key, Object value)
key
- the key.value
- the object value.public MutableDictionary setString(String key, String value)
key
- The keyvalue
- The String value.public MutableDictionary setNumber(String key, Number value)
key
- The keyvalue
- The number value.public MutableDictionary setInt(String key, int value)
key
- The keyvalue
- The int value.public MutableDictionary setLong(String key, long value)
key
- The keyvalue
- The long value.public MutableDictionary setFloat(String key, float value)
key
- The keyvalue
- The float value.public MutableDictionary setDouble(String key, double value)
key
- The keyvalue
- The double value.public MutableDictionary setBoolean(String key, boolean value)
key
- The keyvalue
- The boolean value.public MutableDictionary setBlob(String key, Blob value)
key
- The keyvalue
- The Blob object.public MutableDictionary setDate(String key, Date value)
key
- The keyvalue
- The Date object.public MutableDictionary setArray(String key, Array value)
key
- The keyvalue
- The Array object.public MutableDictionary setDictionary(String key, Dictionary value)
key
- The keyvalue
- The Dictionary object.public MutableDictionary remove(String key)
key
- the key.public MutableArray getArray(String key)
getArray
in class Dictionary
key
- the key.public MutableDictionary getDictionary(String key)
getDictionary
in class Dictionary
key
- the key.public int count()
public int getInt(String key)
public long getLong(String key)
public float getFloat(String key)
public double getDouble(String key)
public boolean getBoolean(String key)
public boolean contains(String key)