public class Dictionary extends Object implements DictionaryInterface, com.couchbase.lite.internal.fleece.FLEncodable, Iterable<String>
Modifier and Type | Method and Description |
---|---|
boolean |
contains(String key)
Tests whether a property exists or not.
|
int |
count()
Gets a number of the entries in the dictionary.
|
void |
encodeTo(com.couchbase.lite.internal.fleece.FLEncoder enc)
encodeTo(FlEncoder) is internal method.
|
boolean |
equals(Object o) |
Array |
getArray(String key)
Get a property's value as a Array, which is a mapping object of an array value.
|
Blob |
getBlob(String key)
Gets a property's value as a Blob.
|
boolean |
getBoolean(String key)
Gets a property's value as a boolean.
|
Date |
getDate(String key)
Gets a property's value as a Date.
|
Dictionary |
getDictionary(String key)
Get a property's value as a Dictionary, which is a mapping object of an dictionary value.
|
double |
getDouble(String key)
Gets a property's value as an double.
|
float |
getFloat(String key)
Gets a property's value as an float.
|
int |
getInt(String key)
Gets a property's value as an int.
|
List<String> |
getKeys() |
long |
getLong(String key)
Gets a property's value as an long.
|
Number |
getNumber(String key)
Gets a property's value as a Number.
|
String |
getString(String key)
Gets a property's value as a String.
|
Object |
getValue(String key)
Gets a property's value as an object.
|
int |
hashCode() |
Iterator<String> |
iterator() |
Map<String,Object> |
toMap()
Gets content of the current object as an Map.
|
MutableDictionary |
toMutable()
Return a mutable copy of the dictionary
|
String |
toString() |
forEach, spliterator
public int count()
count
in interface DictionaryInterface
@NonNull public List<String> getKeys()
getKeys
in interface DictionaryInterface
@Nullable public Object getValue(@NonNull String key)
getValue
in interface DictionaryInterface
key
- the key.@Nullable public String getString(@NonNull String key)
getString
in interface DictionaryInterface
key
- the key@Nullable public Number getNumber(@NonNull String key)
getNumber
in interface DictionaryInterface
key
- the keypublic int getInt(@NonNull String key)
getInt
in interface DictionaryInterface
key
- the keypublic long getLong(@NonNull String key)
getLong
in interface DictionaryInterface
key
- the keypublic float getFloat(@NonNull String key)
getFloat
in interface DictionaryInterface
key
- the keypublic double getDouble(@NonNull String key)
getDouble
in interface DictionaryInterface
key
- the keypublic boolean getBoolean(@NonNull String key)
getBoolean
in interface DictionaryInterface
key
- the key@Nullable public Blob getBlob(@NonNull String key)
getBlob
in interface DictionaryInterface
key
- the key@Nullable public Date getDate(@NonNull String key)
getDate
in interface DictionaryInterface
key
- the key@Nullable public Array getArray(@NonNull String key)
getArray
in interface DictionaryInterface
key
- the key.@Nullable public Dictionary getDictionary(@NonNull String key)
getDictionary
in interface DictionaryInterface
key
- the key.@NonNull public Map<String,Object> toMap()
toMap
in interface DictionaryInterface
public boolean contains(@NonNull String key)
contains
in interface DictionaryInterface
key
- the key@NonNull public MutableDictionary toMutable()
public void encodeTo(com.couchbase.lite.internal.fleece.FLEncoder enc)
encodeTo
in interface com.couchbase.lite.internal.fleece.FLEncodable