Package io.permazen.core
Class CoreIndex1<V,T>
java.lang.Object
io.permazen.core.AbstractCoreIndex<T>
io.permazen.core.CoreIndex1<V,T>
- Type Parameters:
V
- index value typeT
- index target type
Core API
Index1
implementation representing an index on a single field.
Instances are immutable.
-
Method Summary
Modifier and TypeMethodDescriptionasMap()
View this index as aNavigableMap
of target values keyed by indexed value.NavigableSet<Tuple2<V,
T>> asSet()
View this index as aNavigableSet
of tuples.CoreIndex1<V,
T> Apply key filtering to field values at the specified index.CoreIndex1<V,
T> withTargetBounds
(Bounds<T> bounds) ImposeBounds
that restrict the range of the target value.CoreIndex1<V,
T> withValueBounds
(Bounds<V> bounds) ImposeBounds
that restrict the range of the indexed value.Methods inherited from class io.permazen.core.AbstractCoreIndex
getEncodings
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.permazen.index.Index1
numberOfFields
-
Method Details
-
filter
Description copied from class:AbstractCoreIndex
Apply key filtering to field values at the specified index. This method works cummulatively: the new instance filters to the intersection of the given key filter and any existing key filter on that field.- Specified by:
filter
in classAbstractCoreIndex<T>
- Parameters:
index
- zero-based object type field offsetfilter
- key filtering to apply- Returns:
- filtered view of this instance
-
asSet
Description copied from interface:Index1
View this index as aNavigableSet
of tuples. -
asMap
Description copied from interface:Index1
View this index as aNavigableMap
of target values keyed by indexed value. -
withValueBounds
Description copied from interface:Index1
ImposeBounds
that restrict the range of the indexed value.- Specified by:
withValueBounds
in interfaceIndex1<V,
T> - Parameters:
bounds
- bounds to impose on the indexed value- Returns:
- a view of this index in which only values within
bounds
are visible
-
withTargetBounds
Description copied from interface:Index1
ImposeBounds
that restrict the range of the target value.- Specified by:
withTargetBounds
in interfaceIndex1<V,
T> - Parameters:
bounds
- bounds to impose on the target value- Returns:
- a view of this index in which only target values within
bounds
are visible
-