Package com.lucidworks.querying.api
Interface Document.Field<T>
- Type Parameters:
T- Type of field values
- Enclosing interface:
- Document
public static interface Document.Field<T>
Representation of single field in document. Fields can be multivalued
-
Method Summary
Modifier and TypeMethodDescriptionAdd a value to the field.addValues(Collection<?> values) Add more values to the field.getName()map(UnaryOperator<T> mapper) Apply mapping function to each field value.Set new value for this field.setValues(Collection<?> values) Set new values for this field.
-
Method Details
-
getName
String getName()- Returns:
- the field name
-
getValues
Collection<T> getValues()- Returns:
- the field values
-
setValue
Set new value for this field. This will override any previously existing values.- Parameters:
value- Value to set- Returns:
- this field, with modified list of values
-
setValues
Set new values for this field. This will override any previously existing values.- Parameters:
values- Collection of values to set- Returns:
- this field, with a modified list of values
-
addValue
Add a value to the field. This will not override any previously existing values.- Parameters:
value- Value to add- Returns:
- this field, with a modified list of values
-
addValues
Add more values to the field. This will not override any previously existing values.- Parameters:
values- Collection of values to add- Returns:
- this field, with a modified list of values
-
map
Apply mapping function to each field value.- Parameters:
mapper- Mapping function- Returns:
- This field
-