Package io.permazen.index
Interface Index<T>
- Type Parameters:
T- index target type
- All Known Implementing Classes:
AbstractCoreIndex,CoreIndex1,CoreIndex2,CoreIndex3,CoreIndex4
public interface Index<T>
An index on a one or more fields in some target type.
Indexes are read-only and "live", always reflecting the current transaction state.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionasMap()View this index as aNavigableMapof target values keyed by indexed value(s).NavigableSet<? extends Tuple>asSet()View this index as aNavigableSetof tuples.intGet the number of fields in this index.
-
Method Details
-
numberOfFields
int numberOfFields()Get the number of fields in this index.- Returns:
- the number of indexed fields
-
asSet
NavigableSet<? extends Tuple> asSet()View this index as aNavigableSetof tuples.- Returns:
NavigableSetof tuples containing indexed value(s) and target value
-
asMap
NavigableMap<?,NavigableSet<T>> asMap()View this index as aNavigableMapof target values keyed by indexed value(s).- Returns:
NavigableMapfrom indexed value(s) to the corresponding set of target objects
-