Interface ColumnIndex<K,​T extends Element>

  • Type Parameters:
    K - value type
    T - Element class
    All Superinterfaces:
    Iterable<Map.Entry<K,​? extends Set<T>>>

    public interface ColumnIndex<K,​T extends Element>
    extends Iterable<Map.Entry<K,​? extends Set<T>>>
    A column index is associated with a column and and keeps track of each unique value and can also return the minimum and maximum values in case of a sortable value type.
    • Method Detail

      • count

        int count​(K value)
        Counts the elements with value.
        Parameters:
        value - the value
        Returns:
        the number of elements in the column index with value, or zero if none
      • get

        Iterable<T> get​(K value)
        Gets an Iterable of all elements in the column index with value.
        Parameters:
        value - the value
        Returns:
        an iterable with element with value
      • values

        Collection<K> values()
        Returns all unique values.
        Returns:
        a collection of all unique values
      • countValues

        int countValues()
        Counts the unique values.
        Returns:
        the number of distinct values.
      • countElements

        int countElements()
        Counts the elements.
        Returns:
        the number of elements in column
      • isSortable

        boolean isSortable()
        Returns whether the column index is numeric and sortable, and therefore methods getMinValue() and getMaxValue() are available.
        Returns:
        true if sortable, false otherwise
      • getMinValue

        Number getMinValue()
        Returns the minimum value.

        Only applies for sortable indices.

        Returns:
        the minimum value
      • getMaxValue

        Number getMaxValue()
        Returns the maximum value.

        Only applies for sortable indices.

        Returns:
        the maximum value
      • getColumn

        Column getColumn()
        Returns the column for which this column index belongs to.
        Returns:
        the column
      • getVersion

        int getVersion()
        Returns the index's version. The version is incremented every time the index is modified.
        Returns:
        index's version