Package io.permazen.core
Class AbstractCoreIndex<T>
java.lang.Object
io.permazen.core.AbstractCoreIndex<T>
- Type Parameters:
T
- index target type
- All Implemented Interfaces:
Index<T>
- Direct Known Subclasses:
CoreIndex1
,CoreIndex2
,CoreIndex3
,CoreIndex4
Support superclass for the various core index classes.
Instances are immutable.
-
Method Summary
Modifier and TypeMethodDescriptionabstract AbstractCoreIndex<T>
Apply key filtering to field values at the specified index.Get all of theEncoding
s associated with this instance.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.Index
asMap, asSet, numberOfFields
-
Method Details
-
getEncodings
Get all of theEncoding
s associated with this instance. The list includes an entry for each indexed value type, followed by a final entry representing the index target type.- Returns:
- unmodifiable list of encodings
-
filter
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.- Parameters:
index
- zero-based object type field offsetkeyFilter
- key filtering to apply- Returns:
- filtered view of this instance
- Throws:
IndexOutOfBoundsException
- ifindex
is out of rangeIllegalArgumentException
- ifkeyFilter
is null
-