/** * Same as {@link #set(int, ArrowBuf)} 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 buffer ArrowBuf containing decimal value. */ public void setSafe(int index, ArrowBuf buffer) { handleSafe(index); set(index, buffer); }
/** * 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, BigDecimal)} 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 BigDecimal containing decimal value. */ public void setSafe(int index, BigDecimal value) { handleSafe(index); set(index, value); }
/** * Same as {@link #set(int, NullableDecimalHolder)} 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, NullableDecimalHolder holder) throws IllegalArgumentException { handleSafe(index); set(index, holder); }
/** * Same as {@link #setBigEndian(int, byte[])} except that it handles the * case when index is greater than or equal to existing * value capacity {@link #getValueCapacity()}. */ public void setBigEndianSafe(int index, byte[] value) { handleSafe(index); setBigEndian(index, value); }
/** * Same as {@link #set(int, DecimalHolder)} 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, DecimalHolder holder) { handleSafe(index); set(index, holder); }
/** * Same as {@link #copyFrom(int, int, DecimalVector)} 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, DecimalVector from) { handleSafe(thisIndex); copyFrom(fromIndex, thisIndex, from); }
/** * Same as {@link #set(int, int, ArrowBuf)} 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 start start index of data in the buffer * @param buffer ArrowBuf containing decimal value. */ public void setSafe(int index, int start, ArrowBuf buffer) { handleSafe(index); set(index, start, buffer); }
/** * Same as {@link #setSafe(int, int, int, ArrowBuf)} except that it handles * the case when the position of new value is beyond the current value * capacity of the vector. * * @param index position of the new value * @param isSet 0 for NULL value, 1 otherwise * @param start start position of the value in the buffer * @param buffer buffer containing the value to be stored in the vector */ public void setSafe(int index, int isSet, int start, ArrowBuf buffer) { handleSafe(index); set(index, isSet, start, buffer); }