public final class Result extends Object implements DictionaryInterface, Iterable<String>
Modifier and Type | Method and Description |
---|---|
boolean |
contains(String key)
Tests whether a projecting result key exists or not.
|
int |
count() |
Array |
getArray(int index)
The result at the given index as an Array
|
Array |
getArray(String key)
The projecting result value for the given key as a readonly Array object.
|
Blob |
getBlob(int index)
The result at the given index as a Blob
|
Blob |
getBlob(String key)
The projecting result value for the given key as a Blob object.
|
boolean |
getBoolean(int index)
The result at the given index as a boolean
|
boolean |
getBoolean(String key)
The projecting result value for the given key as a boolean value.
|
Date |
getDate(int index)
The result at the given index as a Date
|
Date |
getDate(String key)
The projecting result value for the given key as a Date object.
|
Dictionary |
getDictionary(int index)
The result at the given index as a Dictionary
|
Dictionary |
getDictionary(String key)
The projecting result value for the given key as a readonly Dictionary object.
|
double |
getDouble(int index)
The result at the given index as a double
|
double |
getDouble(String key)
The projecting result value for the given key as a double value.
|
float |
getFloat(int index)
The result at the given index as a float
|
float |
getFloat(String key)
The projecting result value for the given key as a float value.
|
int |
getInt(int index)
The result at the given index as an int
|
int |
getInt(String key)
The projecting result value for the given key as a integer value
Returns 0 if the key doesn't exist.
|
List<String> |
getKeys() |
long |
getLong(int index)
The result at the given index as a long
|
long |
getLong(String key)
The projecting result value for the given key as a long value
Returns 0L if the key doesn't exist.
|
Number |
getNumber(int index)
The result at the given index as a Number
|
Number |
getNumber(String key)
The projecting result value for the given key as a Number object
Returns null if the key doesn't exist.
|
String |
getString(int index)
The result at the given index as a String
|
String |
getString(String key)
The result value for the given key as a String object
Returns null if the key doesn't exist.
|
Object |
getValue(int index)
The result value at the given index.
|
Object |
getValue(String key)
The result value for the given key as a Object
Returns null if the key doesn't exist.
|
Iterator<String> |
iterator()
Gets an iterator over the projecting result keys.
|
String |
toJSON() |
List<Object> |
toList()
Gets all values as a List.
|
Map<String,Object> |
toMap()
Gets all values as a Dictionary.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public int count()
count
in interface DictionaryInterface
@Nullable public Object getValue(int index)
index
- the index of the required value.@Nullable public String getString(int index)
index
- the index of the required value.@Nullable public Number getNumber(int index)
index
- the index of the required value.public int getInt(int index)
index
- the index of the required value.public long getLong(int index)
index
- the index of the required value.public float getFloat(int index)
index
- the index of the required value.public double getDouble(int index)
index
- the index of the required value.public boolean getBoolean(int index)
index
- the index of the required value.@Nullable public Blob getBlob(int index)
index
- the index of the required value.@Nullable public Date getDate(int index)
index
- the index of the required value.@Nullable public Array getArray(int index)
index
- the index of the required value.@Nullable public Dictionary getDictionary(int index)
index
- the index of the required value.@NonNull public List<Object> toList()
@NonNull public List<String> getKeys()
getKeys
in interface DictionaryInterface
@Nullable public Object getValue(@NonNull String key)
getValue
in interface DictionaryInterface
key
- The select result key.@Nullable public String getString(@NonNull String key)
getString
in interface DictionaryInterface
key
- The select result key.@Nullable public Number getNumber(@NonNull String key)
getNumber
in interface DictionaryInterface
key
- The select result key.public int getInt(@NonNull String key)
getInt
in interface DictionaryInterface
key
- The select result key.public long getLong(@NonNull String key)
getLong
in interface DictionaryInterface
key
- The select result key.public float getFloat(@NonNull String key)
getFloat
in interface DictionaryInterface
key
- The select result key.public double getDouble(@NonNull String key)
getDouble
in interface DictionaryInterface
key
- The select result key.public boolean getBoolean(@NonNull String key)
getBoolean
in interface DictionaryInterface
key
- The select result key.@Nullable public Blob getBlob(@NonNull String key)
getBlob
in interface DictionaryInterface
key
- The select result key.@Nullable public Date getDate(@NonNull String key)
getDate
in interface DictionaryInterface
key
- The select result key.@Nullable public Array getArray(@NonNull String key)
getArray
in interface DictionaryInterface
key
- The select result key.@Nullable public Dictionary getDictionary(@NonNull String key)
getDictionary
in interface DictionaryInterface
key
- The select result key.@NonNull public Map<String,Object> toMap()
toMap
in interface DictionaryInterface
@NonNull public String toJSON()
toJSON
in interface DictionaryInterface
public boolean contains(@NonNull String key)
contains
in interface DictionaryInterface
key
- The select result key.