Interface IndexedTable.Index

All Known Implementing Classes:
MapIndex, UniqueLongArrayIndex
Enclosing interface:
IndexedTable

public static interface IndexedTable.Index
Indexes support fast lookups on key columns.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    areKeysUnique(boolean includeNull)
    Returns whether keys are unique in this index.
    it.unimi.dsi.fastutil.ints.IntSortedSet
    find(Object key)
    Returns the list of row numbers corresponding to "key" in this index.
    int
    findUniqueLong(long key)
    Returns the row number corresponding to "key" in this index, or NOT_FOUND if the key does not exist in the index.
    Returns the natural key type for the index.
  • Field Details

  • Method Details

    • keyType

      ColumnType keyType()
      Returns the natural key type for the index.
    • areKeysUnique

      boolean areKeysUnique(boolean includeNull)
      Returns whether keys are unique in this index. If this returns true, then find(Object) will only ever return a zero- or one-element list.
      Parameters:
      includeNull - whether null is considered a valid key
    • find

      it.unimi.dsi.fastutil.ints.IntSortedSet find(@Nullable Object key)
      Returns the list of row numbers corresponding to "key" in this index. If "key" is some type other than the natural type keyType(), it will be converted before checking the index.
    • findUniqueLong

      int findUniqueLong(long key)
      Returns the row number corresponding to "key" in this index, or NOT_FOUND if the key does not exist in the index. It is only valid to call this method if keyType() is ValueType.LONG and areKeysUnique(boolean) returns true.
      Throws:
      UnsupportedOperationException - if preconditions are not met