Interface CategoryCodeList


public interface CategoryCodeList
Stores category codes as a compact immutable integer sequence for dictionary-encoded columns.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    Mutable builder for CategoryCodeList.
    static final class 
    Builder implementation that stores incoming codes as ints before compacting to the smallest suitable representation.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Largest category code that fits in an unsigned byte.
    static final int
    Largest category code that fits in an unsigned char.
  • Method Summary

    Modifier and Type
    Method
    Description
    Creates a mutable builder for category codes.
    Returns an immutable copy of this code list.
    int
    get(int i)
    Returns the code at the supplied index.
    int
    Returns the number of stored category codes.
    int[]
    toArray(int[] x)
    Copies the codes into an int array.
  • Field Details

    • BYTE_MAX_VALUE

      static final int BYTE_MAX_VALUE
      Largest category code that fits in an unsigned byte.
      See Also:
    • CHAR_MAX_VALUE

      static final int CHAR_MAX_VALUE
      Largest category code that fits in an unsigned char.
      See Also:
  • Method Details

    • builder

      static CategoryCodeList.Builder builder()
      Creates a mutable builder for category codes.
      Returns:
      new builder
    • size

      int size()
      Returns the number of stored category codes.
      Returns:
      code count
    • get

      int get(int i)
      Returns the code at the supplied index.
      Parameters:
      i - zero-based index
      Returns:
      category code
    • toArray

      int[] toArray(int[] x)
      Copies the codes into an int array.
      Parameters:
      x - destination array or null
      Returns:
      array of category codes
    • copy

      Returns an immutable copy of this code list.
      Returns:
      copied code list