Interface Index1<V,T>

Type Parameters:
V - indexed value type
T - index target type
All Superinterfaces:
Index<T>
All Known Implementing Classes:
CoreIndex1

public interface Index1<V,T> extends Index<T>
An index on a single field.

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<V>
      Returns:
      the number of indexed fields
    • asSet

      NavigableSet<Tuple2<V,T>> asSet()
      View this index as a NavigableSet of tuples.
      Specified by:
      asSet in interface Index<V>
      Returns:
      NavigableSet of tuples containing indexed value and target value
    • asMap

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

      Index1<V,T> withValueBounds(Bounds<V> bounds)
      Impose Bounds that restrict the range of the indexed value.
      Parameters:
      bounds - bounds to impose on the indexed value
      Returns:
      a view of this index in which only values within bounds are visible
    • withTargetBounds

      Index1<V,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