/** * Get the current value capacity for the vector. * @return number of elements that vector can hold. */ @Override public int getValueCapacity() { return Math.min(getValidityBufferValueCapacity(), super.getValueCapacity()); }
public void setIndexDefined(int index) { while (index >= getValidityBufferValueCapacity()) { /* realloc the inner buffers if needed */ reallocValidityBuffer(); } BitVectorHelper.setValidityBitToOne(validityBuffer, index); }
public void setNull(int index) { while (index >= getValidityBufferValueCapacity()) { /* realloc the inner buffers if needed */ reallocValidityBuffer(); } BitVectorHelper.setValidityBit(validityBuffer, index, 0); }
@Override public void setValueCount(int valueCount) { assert valueCount >= 0; while (valueCount > getValidityBufferValueCapacity()) { /* realloc the inner buffers if needed */ reallocValidityBuffer(); } super.setValueCount(valueCount); this.valueCount = valueCount; } }