public static BitSet fromArray(long[] bits) { return new BitSet(bits); }
protected int getByteSize() { return BitSet.getByteSize(getIndexPkColumnCount()) * 3; }
@Override public void readFields(DataInput input) throws IOException { int length = getIndexPkColumnCount(); descIndexColumnBitSet = BitSet.read(input, length); }
public static BitSet read(DataInput input, int capacity) throws IOException { if (capacity <= BitSet.BITS_PER_BYTE) { return fromPrimitive(input.readByte()); } else if (capacity <= BitSet.BITS_PER_SHORT) { return fromPrimitive(input.readShort()); } else if (capacity <= BitSet.BITS_PER_INT) { return fromPrimitive(input.readInt()); } else if (capacity <= BitSet.BITS_PER_LONG) { return fromPrimitive(input.readLong()); } else { int nLongs = (capacity-1) / BitSet.BITS_PER_LONG + 1; return fromArray(ByteUtil.readFixedLengthLongArray(input, nLongs)); } }
@Override public void write(DataOutput output) throws IOException { int length = getIndexPkColumnCount(); BitSet.write(output, descIndexColumnBitSet, length); }
private RowKeyMetaData(int nIndexedColumns) { descIndexColumnBitSet = BitSet.withCapacity(nIndexedColumns); }
if (isBytesComparable && isDataColumnInverted == descIndexColumnBitSet.get(i)) { output.write(ptr.get(), ptr.getOffset(), ptr.getLength()); } else { indexColumnType.coerceBytes(ptr, dataColumnType, dataColumnModifier, null); if (descIndexColumnBitSet.get(i) != isDataColumnInverted) { writeInverted(ptr.get(), ptr.getOffset(), ptr.getLength(), output); } else {
rowKeyMetaData.getDescIndexColumnBitSet().set(indexPos);
public static BitSet fromPrimitive(byte bits) { return new BitSet(new long[] { bits }); }
public static BitSet fromPrimitive(int bits) { return new BitSet(new long[] { bits }); }
public static BitSet fromPrimitive(long bits) { return new BitSet(new long[] { bits }); }
public static BitSet fromPrimitive(short bits) { return new BitSet(new long[] { bits }); }
public static BitSet withCapacity(int maxBits) { int size = Math.max(1,(maxBits + BITS_PER_LONG -1) / BITS_PER_LONG); return new BitSet(new long[size]); }