Package io.permazen.index
Interface Index4<V1,V2,V3,V4,T>
- Type Parameters:
V1
- first indexed value typeV2
- second indexed value typeV3
- third indexed value typeV4
- fourth indexed value typeT
- index target type
- All Superinterfaces:
Index<T>
- All Known Implementing Classes:
CoreIndex4
An index on a four fields.
Indexes are read-only and "live", always reflecting the current transaction state.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionasIndex1()
Get the prefix of this instance that only includes the first two indexed fields.asIndex2()
Get the prefix of this instance that only includes the first three indexed fields.asIndex3()
Get the prefix of this instance that only includes the first four indexed fields.NavigableMap<Tuple4<V1,
V2, V3, V4>, NavigableSet<T>> asMap()
View this index as aNavigableMap
of target values keyed by indexed value tuples.View this index as aNavigableMap
ofIndex1
s keyed by the first three values.View this index as aNavigableMap
ofIndex2
s keyed by the first two values.View this index as aNavigableMap
ofIndex3
s keyed by the first value.asSet()
View this index as aNavigableSet
of tuples.default int
Get the number of fields in this index.withTargetBounds
(Bounds<T> bounds) ImposeBounds
that restrict the range of the target value.withValue1Bounds
(Bounds<V1> bounds) ImposeBounds
that restrict the range of the first indexed value.withValue2Bounds
(Bounds<V2> bounds) ImposeBounds
that restrict the range of the second indexed value.withValue3Bounds
(Bounds<V3> bounds) ImposeBounds
that restrict the range of the third indexed value.withValue4Bounds
(Bounds<V4> bounds) ImposeBounds
that restrict the range of the fourth indexed value.
-
Method Details
-
numberOfFields
default int numberOfFields()Description copied from interface:Index
Get the number of fields in this index.- Specified by:
numberOfFields
in interfaceIndex<V1>
- Returns:
- the number of indexed fields
-
asSet
View this index as aNavigableSet
of tuples.- Specified by:
asSet
in interfaceIndex<V1>
- Returns:
NavigableSet
of tuples containing indexed values and target value
-
asMap
NavigableMap<Tuple4<V1,V2, asMap()V3, V4>, NavigableSet<T>> View this index as aNavigableMap
of target values keyed by indexed value tuples.- Specified by:
asMap
in interfaceIndex<V1>
- Returns:
NavigableMap
from indexed value tuple to the corresponding set of target objects
-
asMapOfIndex1
View this index as aNavigableMap
ofIndex1
s keyed by the first three values.- Returns:
NavigableMap
from first three values toIndex1
-
asMapOfIndex2
View this index as aNavigableMap
ofIndex2
s keyed by the first two values.- Returns:
NavigableMap
from first two values toIndex2
-
asMapOfIndex3
View this index as aNavigableMap
ofIndex3
s keyed by the first value.- Returns:
NavigableMap
from first value toIndex3
-
asIndex3
Get the prefix of this instance that only includes the first four indexed fields.- Returns:
- prefix of this index
-
asIndex2
Get the prefix of this instance that only includes the first three indexed fields.- Returns:
- prefix of this index
-
asIndex1
Get the prefix of this instance that only includes the first two indexed fields.- Returns:
- prefix of this index
-
withValue1Bounds
ImposeBounds
that restrict the range of the first indexed value.- 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
ImposeBounds
that restrict the range of the second indexed value.- 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
-
withValue3Bounds
ImposeBounds
that restrict the range of the third indexed value.- Parameters:
bounds
- bounds to impose on the third indexed value- Returns:
- a view of this index in which only third values within
bounds
are visible
-
withValue4Bounds
ImposeBounds
that restrict the range of the fourth indexed value.- Parameters:
bounds
- bounds to impose on the fourth indexed value- Returns:
- a view of this index in which only fourth values within
bounds
are visible
-
withTargetBounds
ImposeBounds
that restrict the range of the target value.- Parameters:
bounds
- bounds to impose on the target value- Returns:
- a view of this index in which only target values within
bounds
are visible
-