-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Description
Add the read API
Field<T> interface
Represents a field that may or may not exist within a document.
-
String getName()
Returns the name of the field. -
boolean isEmpty()
Checks if at least one value exists. -
T getValue(T defaultValue)
Returns the first value, if exists, otherwise returns defaultValue. This may access the first indexed value, or the document source if the field is not indexed and the source is available. -
List<T> getValues()
Returns values of the field, as if they were indexed. This may access indexed values, or the document source if the field is not indexed and the source is available. -
boolean hasValue(Predicate<T> predicate)(post 8.1.0)
Returns true if exactly one value exists and that value matches the specified predicate, otherwise false. -
boolean containsValue(Predicate<T> predicate)(post 8.10)
Returns true if any value matches the specified predicate, otherwise false.