/** * Same as {@link #set(int, BitHolder)} except that it handles the * case when index is greater than or equal to existing * value capacity {@link #getValueCapacity()}. * * @param index position of element * @param holder data holder for value of element */ public void setSafe(int index, BitHolder holder) { handleSafe(index); set(index, holder); }
/** * Set the element at the given index to null. * * @param index position of element */ public void setNull(int index) { handleSafe(index); // not really needed to set the bit to 0 as long as // the buffer always starts from 0. BitVectorHelper.setValidityBit(validityBuffer, index, 0); }
/** * Same as {@link #set(int, int)} except that it handles the * case when index is greater than or equal to existing * value capacity {@link #getValueCapacity()}. * * @param index position of element * @param value value of element */ public void setSafe(int index, int value) { handleSafe(index); set(index, value); }
/** * Same as {@link #setToOne(int)} except that it handles the case when * index is greater than or equal to current value capacity of the vector. * * @param index position of the element */ public void setSafeToOne(int index) { handleSafe(index); setToOne(index); }
/** * Same as {@link #set(int, NullableBitHolder)} except that it handles the * case when index is greater than or equal to existing * value capacity {@link #getValueCapacity()}. * * @param index position of element * @param holder nullable data holder for value of element */ public void setSafe(int index, NullableBitHolder holder) throws IllegalArgumentException { handleSafe(index); set(index, holder); }
/** * Same as {@link #set(int, int, int)} except that it handles the case * when index is greater than or equal to current value capacity of the * vector. * * @param index position of the new value * @param isSet 0 for NULL value, 1 otherwise * @param value element value */ public void setSafe(int index, int isSet, int value) { handleSafe(index); set(index, isSet, value); }
/** * Same as {@link #copyFrom(int, int, BitVector)} except that * it handles the case when the capacity of the vector needs to be expanded * before copy. * * @param fromIndex position to copy from in source vector * @param thisIndex position to copy to in this vector * @param from source vector */ public void copyFromSafe(int fromIndex, int thisIndex, BitVector from) { handleSafe(thisIndex); copyFrom(fromIndex, thisIndex, from); }