public final class MutableDictionary extends Dictionary implements MutableDictionaryInterface
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 |
---|---|
MutableArray |
getArray(String key)
Get a property's value as a Array, which is a mapping object of an array value.
|
MutableDictionary |
getDictionary(String key)
Get a property's value as a Dictionary, which is a mapping object of an dictionary value.
|
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.
|
contains, count, encodeTo, equals, getBlob, getBoolean, getDate, getDouble, getFloat, getInt, getKeys, getLong, getNumber, getString, getValue, hashCode, iterator, toMap, toMutable, toString
contains, count, getBlob, getBoolean, getDate, getDouble, getFloat, getInt, getKeys, getLong, getNumber, getString, getValue, toMap
forEach, spliterator
public MutableDictionary()
public MutableDictionary(Map<String,Object> data)
data
- the dictionary object.@NonNull public MutableDictionary setData(Map<String,Object> data)
setData
in interface MutableDictionaryInterface
data
- the dictionary object.@NonNull public MutableDictionary setValue(@NonNull String key, Object value)
setValue
in interface MutableDictionaryInterface
key
- the key.value
- the object value.@NonNull public MutableDictionary setString(@NonNull String key, String value)
setString
in interface MutableDictionaryInterface
key
- The keyvalue
- The String value.@NonNull public MutableDictionary setNumber(@NonNull String key, Number value)
setNumber
in interface MutableDictionaryInterface
key
- The keyvalue
- The number value.@NonNull public MutableDictionary setInt(@NonNull String key, int value)
setInt
in interface MutableDictionaryInterface
key
- The keyvalue
- The int value.@NonNull public MutableDictionary setLong(@NonNull String key, long value)
setLong
in interface MutableDictionaryInterface
key
- The keyvalue
- The long value.@NonNull public MutableDictionary setFloat(@NonNull String key, float value)
setFloat
in interface MutableDictionaryInterface
key
- The keyvalue
- The float value.@NonNull public MutableDictionary setDouble(@NonNull String key, double value)
setDouble
in interface MutableDictionaryInterface
key
- The keyvalue
- The double value.@NonNull public MutableDictionary setBoolean(@NonNull String key, boolean value)
setBoolean
in interface MutableDictionaryInterface
key
- The keyvalue
- The boolean value.@NonNull public MutableDictionary setBlob(@NonNull String key, Blob value)
setBlob
in interface MutableDictionaryInterface
key
- The keyvalue
- The Blob object.@NonNull public MutableDictionary setDate(@NonNull String key, Date value)
setDate
in interface MutableDictionaryInterface
key
- The keyvalue
- The Date object.@NonNull public MutableDictionary setArray(@NonNull String key, Array value)
setArray
in interface MutableDictionaryInterface
key
- The keyvalue
- The Array object.@NonNull public MutableDictionary setDictionary(@NonNull String key, Dictionary value)
setDictionary
in interface MutableDictionaryInterface
key
- The keyvalue
- The Dictionary object.@NonNull public MutableDictionary remove(@NonNull String key)
remove
in interface MutableDictionaryInterface
key
- the key.public MutableArray getArray(@NonNull String key)
getArray
in interface DictionaryInterface
getArray
in interface MutableDictionaryInterface
getArray
in class Dictionary
key
- the key.public MutableDictionary getDictionary(@NonNull String key)
getDictionary
in interface DictionaryInterface
getDictionary
in interface MutableDictionaryInterface
getDictionary
in class Dictionary
key
- the key.