Class DefaultRowLocations
- java.lang.Object
-
- com.couchbase.client.java.search.result.DefaultRowLocations
-
- All Implemented Interfaces:
RowLocations
@Volatile public class DefaultRowLocations extends Object implements RowLocations
A default implementation of aRowLocations
.- Since:
- 2.3.0
- Author:
- Simon Baslé, Michael Nitschinger
-
-
Constructor Summary
Constructors Constructor Description DefaultRowLocations()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description RowLocations
add(RowLocation l)
add a location and allow method chaininglong
count()
size of all()List<String>
fields()
list the fields in this locationstatic RowLocations
from(JsonObject locationsJson)
Parses a FTS JSON representation of aRowLocations
.List<RowLocation>
get(String field)
list all locations for a given field (any term)List<RowLocation>
get(String field, String term)
list all locations for a given field and termList<RowLocation>
getAll()
list all locations (any field, any term)Set<String>
terms()
list all terms in this locations, considering all fields (so a set)List<String>
termsFor(String field)
list the terms for a given fieldString
toString()
-
-
-
Method Detail
-
add
public RowLocations add(RowLocation l)
Description copied from interface:RowLocations
add a location and allow method chaining- Specified by:
add
in interfaceRowLocations
-
get
public List<RowLocation> get(String field)
Description copied from interface:RowLocations
list all locations for a given field (any term)- Specified by:
get
in interfaceRowLocations
-
get
public List<RowLocation> get(String field, String term)
Description copied from interface:RowLocations
list all locations for a given field and term- Specified by:
get
in interfaceRowLocations
-
getAll
public List<RowLocation> getAll()
Description copied from interface:RowLocations
list all locations (any field, any term)- Specified by:
getAll
in interfaceRowLocations
-
count
public long count()
Description copied from interface:RowLocations
size of all()- Specified by:
count
in interfaceRowLocations
-
fields
public List<String> fields()
Description copied from interface:RowLocations
list the fields in this location- Specified by:
fields
in interfaceRowLocations
-
termsFor
public List<String> termsFor(String field)
Description copied from interface:RowLocations
list the terms for a given field- Specified by:
termsFor
in interfaceRowLocations
-
terms
public Set<String> terms()
Description copied from interface:RowLocations
list all terms in this locations, considering all fields (so a set)- Specified by:
terms
in interfaceRowLocations
-
from
public static RowLocations from(JsonObject locationsJson)
Parses a FTS JSON representation of aRowLocations
.
-
-