Interface Index2<V1,V2,T>

Type Parameters:
V1 - first indexed value type
V2 - second indexed value type
T - index target type
All Superinterfaces:
Index<T>
All Known Implementing Classes:
CoreIndex2

public interface Index2<V1,V2,T> extends Index<T>
An index on two fields.

Indexes are read-only and "live", always reflecting the current transaction state.

See Also:
  • Method Details

    • numberOfFields

      default int numberOfFields()
      Description copied from interface: Index
      Get the number of fields in this index.
      Specified by:
      numberOfFields in interface Index<V1>
      Returns:
      the number of indexed fields
    • asSet

      View this index as a NavigableSet of tuples.
      Specified by:
      asSet in interface Index<V1>
      Returns:
      NavigableSet of tuples containing indexed values and target value
    • asMap

      View this index as a NavigableMap of target values keyed by indexed value tuples.
      Specified by:
      asMap in interface Index<V1>
      Returns:
      NavigableMap from indexed value tuple to the corresponding set of target objects
    • asMapOfIndex1

      NavigableMap<V1,Index1<V2,T>> asMapOfIndex1()
      View this index as a NavigableMap of Index1s keyed by the first value.
      Returns:
      NavigableMap from first value to Index1
    • asIndex1

      Index1<V1,V2> asIndex1()
      Get the prefix of this instance that only includes the first two indexed fields.
      Returns:
      prefix of this index
    • withValue1Bounds

      Index2<V1,V2,T> withValue1Bounds(Bounds<V1> bounds)
      Impose Bounds 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

      Index2<V1,V2,T> withValue2Bounds(Bounds<V2> bounds)
      Impose Bounds 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
    • withTargetBounds

      Index2<V1,V2,T> withTargetBounds(Bounds<T> bounds)
      Impose Bounds 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