public ArrayTable.Content get() { final ColumnLoader loader = new ColumnLoader<T>(typeFactory, source, protoRowType, repList); return new ArrayTable.Content(loader.representationValues, loader.size(), loader.sortField); } }));
@Override public String toString() { return "Column(representation=" + representation + ", value=" + representation.toString(dataSet) + ")"; }
/** Freezes the contents of this value set into a column, optionally * re-ordering if {@code sources} is specified. */ ArrayTable.Column freeze(int ordinal, int[] sources) { ArrayTable.Representation representation = chooseRep(ordinal); final int cardinality = map.size() + (containsNull ? 1 : 0); final Object data = representation.freeze(this, sources); return new ArrayTable.Column(representation, data, cardinality); }
public static long getLong( int bitCount, int chunksPerWord, long mask, long[] values, int ordinal) { final int word = ordinal / chunksPerWord; final int chunk = ordinal % chunksPerWord; final long value = values[word]; final int shift = chunk * bitCount; return (value >> shift) & mask; }
public static void orLong( int bitCount, long[] values, int ordinal, long value) { orLong(bitCount, 64 / bitCount, values, ordinal, value); }
public Object getObject(Object dataSet, int ordinal) { final Pair<Object, Comparable[]> pair = (Pair<Object, Comparable[]>) dataSet; int code = representation.getInt(pair.left, ordinal); return pair.right[code]; }
public int size(Object dataSet) { final Pair<Object, Comparable[]> pair = (Pair<Object, Comparable[]>) dataSet; return representation.size(pair.left); }
/** Freezes the contents of this value set into a column, optionally * re-ordering if {@code sources} is specified. */ ArrayTable.Column freeze(int ordinal, int[] sources) { ArrayTable.Representation representation = chooseRep(ordinal); final int cardinality = map.size() + (containsNull ? 1 : 0); final Object data = representation.freeze(this, sources); return new ArrayTable.Column(representation, data, cardinality); }
public static long getLong( int bitCount, int chunksPerWord, long mask, long[] values, int ordinal) { final int word = ordinal / chunksPerWord; final int chunk = ordinal % chunksPerWord; final long value = values[word]; final int shift = chunk * bitCount; return (value >> shift) & mask; }
public static void orLong( int bitCount, long[] values, int ordinal, long value) { orLong(bitCount, 64 / bitCount, values, ordinal, value); }
@Override public String toString() { return "Column(representation=" + representation + ", value=" + representation.toString(dataSet) + ")"; }
public Object getObject(Object dataSet, int ordinal) { final Pair<Object, Comparable[]> pair = (Pair<Object, Comparable[]>) dataSet; int code = representation.getInt(pair.left, ordinal); return pair.right[code]; }
public int size(Object dataSet) { final Pair<Object, Comparable[]> pair = (Pair<Object, Comparable[]>) dataSet; return representation.size(pair.left); }