Class CoreIndex3<V1,V2,V3,T>

java.lang.Object
io.permazen.core.AbstractCoreIndex<T>
io.permazen.core.CoreIndex3<V1,V2,V3,T>
Type Parameters:
V1 - first index value type
V2 - second index value type
V3 - third index value type
T - index target type
All Implemented Interfaces:
Index<T>, Index3<V1,V2,V3,T>

public class CoreIndex3<V1,V2,V3,T> extends AbstractCoreIndex<T> implements Index3<V1,V2,V3,T>
Core API Index3 implementation representing a composite index on three fields.

Instances are immutable.

  • Method Details

    • filter

      public CoreIndex3<V1,V2,V3,T> filter(int index, KeyFilter 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 class AbstractCoreIndex<T>
      Parameters:
      index - zero-based object type field offset
      filter - key filtering to apply
      Returns:
      filtered view of this instance
    • asSet

      public NavigableSet<Tuple4<V1,V2,V3,T>> asSet()
      Description copied from interface: Index3
      View this index as a NavigableSet of tuples.
      Specified by:
      asSet in interface Index<V1>
      Specified by:
      asSet in interface Index3<V1,V2,V3,T>
      Returns:
      NavigableSet of tuples containing indexed values and target value
    • asMap

      public NavigableMap<Tuple3<V1,V2,V3>,NavigableSet<T>> asMap()
      Description copied from interface: Index3
      View this index as a NavigableMap of target values keyed by indexed value tuples.
      Specified by:
      asMap in interface Index<V1>
      Specified by:
      asMap in interface Index3<V1,V2,V3,T>
      Returns:
      NavigableMap from indexed value tuple to the corresponding set of target objects
    • asMapOfIndex1

      public NavigableMap<Tuple2<V1,V2>,Index1<V3,T>> asMapOfIndex1()
      Description copied from interface: Index3
      View this index as a NavigableMap of Index1s keyed by the first two values.
      Specified by:
      asMapOfIndex1 in interface Index3<V1,V2,V3,T>
      Returns:
      NavigableMap from first two values to Index1
    • asMapOfIndex2

      public NavigableMap<V1,Index2<V2,V3,T>> asMapOfIndex2()
      Description copied from interface: Index3
      View this index as a NavigableMap of Index2s keyed by the first value.
      Specified by:
      asMapOfIndex2 in interface Index3<V1,V2,V3,T>
      Returns:
      NavigableMap from first value to Index2
    • asIndex2

      public CoreIndex2<V1,V2,V3> asIndex2()
      Description copied from interface: Index3
      Get the prefix of this instance that only includes the first three indexed fields.
      Specified by:
      asIndex2 in interface Index3<V1,V2,V3,T>
      Returns:
      prefix of this index
    • asIndex1

      public CoreIndex1<V1,V2> asIndex1()
      Description copied from interface: Index3
      Get the prefix of this instance that only includes the first two indexed fields.
      Specified by:
      asIndex1 in interface Index3<V1,V2,V3,T>
      Returns:
      prefix of this index
    • withValue1Bounds

      public CoreIndex3<V1,V2,V3,T> withValue1Bounds(Bounds<V1> bounds)
      Description copied from interface: Index3
      Impose Bounds that restrict the range of the first indexed value.
      Specified by:
      withValue1Bounds in interface Index3<V1,V2,V3,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

      public CoreIndex3<V1,V2,V3,T> withValue2Bounds(Bounds<V2> bounds)
      Description copied from interface: Index3
      Impose Bounds that restrict the range of the second indexed value.
      Specified by:
      withValue2Bounds in interface Index3<V1,V2,V3,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
    • withValue3Bounds

      public CoreIndex3<V1,V2,V3,T> withValue3Bounds(Bounds<V3> bounds)
      Description copied from interface: Index3
      Impose Bounds that restrict the range of the third indexed value.
      Specified by:
      withValue3Bounds in interface Index3<V1,V2,V3,T>
      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
    • withTargetBounds

      public CoreIndex3<V1,V2,V3,T> withTargetBounds(Bounds<T> bounds)
      Description copied from interface: Index3
      Impose Bounds that restrict the range of the target value.
      Specified by:
      withTargetBounds in interface Index3<V1,V2,V3,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