Interface IndexBuilder

All Known Subinterfaces:
Index.RandomBuilder
All Known Implementing Classes:
Index.AbstractRandomBuilder, Index.AdaptiveIndexBuilder

public interface IndexBuilder
A builder that constructs an Index from a set of keys.
  • Method Details

    • getIndex

      Index getIndex()
      Get the index constructed from all of the keys added so far.
      Returns:
      an Index
    • addKey

      void addKey(long key)
      Add the specified key to the builder.
      Parameters:
      key - the key
    • addRange

      void addRange(long firstKey, long lastKey)
      Append the specified range of keys to the builder.
      Parameters:
      firstKey - the first key in the range (inclusive)
      lastKey - the last key in the range (inclusive)
    • addKeys

      default void addKeys(PrimitiveIterator.OfLong it)
      Add a set of keys from the provided long iterator.
      Parameters:
      it - the iterator
    • addRanges

      default void addRanges(LongRangeIterator it)
      Add all of the ranges from the specified LongRangeIterator.
      Parameters:
      it - the long range iterator
    • addKeyIndicesChunk

      default void addKeyIndicesChunk(LongChunk<Attributes.KeyIndices> chunk)
      Add all of the keys from the specified Attributes.KeyIndices.
      Parameters:
      chunk - the chunk of ordered indices
    • addKeyIndicesChunk

      default void addKeyIndicesChunk(IntChunk<Attributes.KeyIndices> chunk)
      Add all of the keys from the specified Attributes.KeyIndices.
      Parameters:
      chunk - the chunk of ordered indices
    • addOrderedKeyIndicesChunk

      default void addOrderedKeyIndicesChunk(LongChunk<Attributes.OrderedKeyIndices> chunk)
      Add all of the keys from the specified Attributes.OrderedKeyIndices.
      Parameters:
      chunk - the chunk of ordered indices
    • addIndex

      default void addIndex(ReadOnlyIndex idx)
      Add the entire ReadOnlyIndex to this builder
      Parameters:
      idx - the index