Package app.babylon.table.column
Interface CategoryCodeList
public interface CategoryCodeList
Stores category codes as a compact immutable integer sequence for
dictionary-encoded columns.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceMutable builder forCategoryCodeList.static final classBuilder implementation that stores incoming codes as ints before compacting to the smallest suitable representation. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intLargest category code that fits in an unsigned byte.static final intLargest category code that fits in an unsigned char. -
Method Summary
Modifier and TypeMethodDescriptionstatic CategoryCodeList.Builderbuilder()Creates a mutable builder for category codes.copy()Returns an immutable copy of this code list.intget(int i) Returns the code at the supplied index.intsize()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_VALUELargest category code that fits in an unsigned byte.- See Also:
-
CHAR_MAX_VALUE
static final int CHAR_MAX_VALUELargest category code that fits in an unsigned char.- See Also:
-
-
Method Details
-
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 ornull- Returns:
- array of category codes
-
copy
CategoryCodeList copy()Returns an immutable copy of this code list.- Returns:
- copied code list
-