Package io.permazen.core
Class CoreIndex2<V1,V2,T>
java.lang.Object
io.permazen.core.AbstractCoreIndex<T>
io.permazen.core.CoreIndex2<V1,V2,T>
- Type Parameters:
V1
- first index value typeV2
- second index value typeT
- index target type
Core API
Index2
implementation representing a composite index on two fields.
Instances are immutable.
-
Method Summary
Modifier and TypeMethodDescriptionasIndex1()
Get the prefix of this instance that only includes the first two indexed fields.asMap()
View this index as aNavigableMap
of target values keyed by indexed value tuples.NavigableMap<V1,
Index1<V2, T>> View this index as aNavigableMap
ofIndex1
s keyed by the first value.NavigableSet<Tuple3<V1,
V2, T>> asSet()
View this index as aNavigableSet
of tuples.CoreIndex2<V1,
V2, T> Apply key filtering to field values at the specified index.CoreIndex2<V1,
V2, T> withTargetBounds
(Bounds<T> bounds) ImposeBounds
that restrict the range of the target value.CoreIndex2<V1,
V2, T> withValue1Bounds
(Bounds<V1> bounds) ImposeBounds
that restrict the range of the first indexed value.CoreIndex2<V1,
V2, T> withValue2Bounds
(Bounds<V2> bounds) ImposeBounds
that restrict the range of the second 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.Index2
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:Index2
View this index as aNavigableSet
of tuples. -
asMap
Description copied from interface:Index2
View this index as aNavigableMap
of target values keyed by indexed value tuples. -
asMapOfIndex1
Description copied from interface:Index2
View this index as aNavigableMap
ofIndex1
s keyed by the first value.- Specified by:
asMapOfIndex1
in interfaceIndex2<V1,
V2, T> - Returns:
NavigableMap
from first value toIndex1
-
asIndex1
Description copied from interface:Index2
Get the prefix of this instance that only includes the first two indexed fields. -
withValue1Bounds
Description copied from interface:Index2
ImposeBounds
that restrict the range of the first indexed value.- Specified by:
withValue1Bounds
in interfaceIndex2<V1,
V2, T> - Parameters:
bounds
- bounds to impose on the first indexed value- Returns:
- a view of this index in which only first values within
bounds
are visible
-
withValue2Bounds
Description copied from interface:Index2
ImposeBounds
that restrict the range of the second indexed value.- Specified by:
withValue2Bounds
in interfaceIndex2<V1,
V2, T> - Parameters:
bounds
- bounds to impose on the second indexed value- Returns:
- a view of this index in which only second values within
bounds
are visible
-
withTargetBounds
Description copied from interface:Index2
ImposeBounds
that restrict the range of the target value.- Specified by:
withTargetBounds
in interfaceIndex2<V1,
V2, 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
-