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 aNavigableMapof target values keyed by indexed value tuples.View this index as aNavigableMapofIndex1s keyed by the first three values.View this index as aNavigableMapofIndex2s keyed by the first two values.View this index as aNavigableMapofIndex3s keyed by the first value.asSet()View this index as aNavigableSetof tuples.default intGet the number of fields in this index.withTargetBounds(Bounds<T> bounds) ImposeBoundsthat restrict the range of the target value.withValue1Bounds(Bounds<V1> bounds) ImposeBoundsthat restrict the range of the first indexed value.withValue2Bounds(Bounds<V2> bounds) ImposeBoundsthat restrict the range of the second indexed value.withValue3Bounds(Bounds<V3> bounds) ImposeBoundsthat restrict the range of the third indexed value.withValue4Bounds(Bounds<V4> bounds) ImposeBoundsthat restrict the range of the fourth indexed value.
-
Method Details
-
numberOfFields
default int numberOfFields()Description copied from interface:IndexGet the number of fields in this index.- Specified by:
numberOfFieldsin interfaceIndex<V1>- Returns:
- the number of indexed fields
-
asSet
View this index as aNavigableSetof tuples.- Specified by:
asSetin interfaceIndex<V1>- Returns:
NavigableSetof tuples containing indexed values and target value
-
asMap
NavigableMap<Tuple4<V1,V2, asMap()V3, V4>, NavigableSet<T>> View this index as aNavigableMapof target values keyed by indexed value tuples.- Specified by:
asMapin interfaceIndex<V1>- Returns:
NavigableMapfrom indexed value tuple to the corresponding set of target objects
-
asMapOfIndex1
View this index as aNavigableMapofIndex1s keyed by the first three values.- Returns:
NavigableMapfrom first three values toIndex1
-
asMapOfIndex2
View this index as aNavigableMapofIndex2s keyed by the first two values.- Returns:
NavigableMapfrom first two values toIndex2
-
asMapOfIndex3
View this index as aNavigableMapofIndex3s keyed by the first value.- Returns:
NavigableMapfrom 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
ImposeBoundsthat 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
boundsare visible
-
withValue2Bounds
ImposeBoundsthat 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
boundsare visible
-
withValue3Bounds
ImposeBoundsthat 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
boundsare visible
-
withValue4Bounds
ImposeBoundsthat 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
boundsare visible
-
withTargetBounds
ImposeBoundsthat 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
boundsare visible
-