/** * Same as {@link #set(int, SmallIntHolder)} 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, SmallIntHolder holder) { handleSafe(index); set(index, holder); }
/** * Same as {@link #set(int, NullableSmallIntHolder)} 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, NullableSmallIntHolder holder) throws IllegalArgumentException { handleSafe(index); set(index, holder); }
/** * Same as {@link #set(int, int, short)} 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, short value) { handleSafe(index); set(index, isSet, value); }
/** * 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 #set(int, short)} 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, short value) { handleSafe(index); set(index, value); }
/** * 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 #copyFrom(int, int, SmallIntVector)} 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, SmallIntVector from) { handleSafe(thisIndex); copyFrom(fromIndex, thisIndex, from); }