/** * Get the starting position (offset) in the data stream for a given * element in the vector. * * @param index position of the element in the vector * @return starting offset for the element */ public long getStartEnd(int index) { return offsetBuffer.getLong(index * OFFSET_WIDTH); }
/** * Given a data buffer, get the value stored at a particular position * in the vector. * * <p>This method should not be used externally. * * @param buffer data buffer * @param index position of the element. * @return value stored at the index. */ public static long get(final ArrowBuf buffer, final int index) { return buffer.getLong(index * TYPE_WIDTH); }
/** * Given a data buffer, get the value stored at a particular position * in the vector. * * <p>This method should not be used externally. * * @param buffer data buffer * @param index position of the element. * @return value stored at the index. */ public static long get(final ArrowBuf buffer, int index) { return buffer.getLong(index * TYPE_WIDTH); }
/** * Given a data buffer, get the value stored at a particular position * in the vector. * * <p>This method should not be used externally. * * @param buffer data buffer * @param index position of the element. * @return value stored at the index. */ public static long get(final ArrowBuf buffer, final int index) { return buffer.getLong(index * TYPE_WIDTH); }
/** * Given a data buffer, get the value stored at a particular position * in the vector. * * <p>This method should not be used externally. * * @param buffer data buffer * @param index position of the element. * @return value stored at the index. */ public static long get(final ArrowBuf buffer, final int index) { return buffer.getLong(index * TYPE_WIDTH); }
public long get(int index) { return dataBuffer.getLong(index * TYPE_WIDTH); }
@Override public double getDouble(int index) { return Double.longBitsToDouble(getLong(index)); }
/** * Get the element at the given index from the vector. * * @param index position of element * @return element at given index */ public long get(int index) throws IllegalStateException { if (isSet(index) == 0) { throw new IllegalStateException("Value at index is null"); } return valueBuffer.getLong(index * TYPE_WIDTH); }
/** * Get the element at the given index from the vector. * * @param index position of element * @return element at given index */ public long get(int index) throws IllegalStateException { if (isSet(index) == 0) { throw new IllegalStateException("Value at index is null"); } return valueBuffer.getLong(index * TYPE_WIDTH); }
/** * Get the element at the given index from the vector. * * @param index position of element * @return element at given index */ public long get(int index) throws IllegalStateException { if (isSet(index) == 0) { throw new IllegalStateException("Value at index is null"); } return valueBuffer.getLong(index * TYPE_WIDTH); }
/** * Get the element at the given index from the vector. * * @param index position of element * @return element at given index */ public long get(int index) throws IllegalStateException { if (isSet(index) == 0) { throw new IllegalStateException("Value at index is null"); } return valueBuffer.getLong(index * TYPE_WIDTH); }
/** * Get the element at the given index from the vector. * * @param index position of element * @return element at given index */ public long get(int index) throws IllegalStateException { if (isSet(index) == 0) { throw new IllegalStateException("Value at index is null"); } return valueBuffer.getLong(index * TYPE_WIDTH); }
/** * Get the element at the given index from the vector. * * @param index position of element * @return element at given index */ public long get(int index) throws IllegalStateException { if (isSet(index) == 0) { throw new IllegalStateException("Value at index is null"); } return valueBuffer.getLong(index * TYPE_WIDTH); }
/** * Same as {@link #get(int)}. * * @param index position of element * @return element at given index */ public Long getObject(int index) { if (isSet(index) == 0) { return null; } else { return valueBuffer.getLong(index * TYPE_WIDTH); } }
/** * Same as {@link #get(int)}. * * @param index position of element * @return element at given index */ public Long getObject(int index) { if (isSet(index) == 0) { return null; } else { return valueBuffer.getLong(index * TYPE_WIDTH); } }
/** * Same as {@link #get(int)}. * * @param index position of element * @return element at given index */ public Long getObject(int index) { if (isSet(index) == 0) { return null; } else { return valueBuffer.getLong(index * TYPE_WIDTH); } }
/** * Get the element at the given index from the vector and * sets the state in holder. If element at given index * is null, holder.isSet will be zero. * * @param index position of element */ public void get(int index, NullableDateMilliHolder holder) { if (isSet(index) == 0) { holder.isSet = 0; return; } holder.isSet = 1; holder.value = valueBuffer.getLong(index * TYPE_WIDTH); }
/** * Copy a cell value from a particular index in source vector to a particular * position in this vector. * * @param fromIndex position to copy from in source vector * @param thisIndex position to copy to in this vector * @param from source vector */ public void copyFrom(int fromIndex, int thisIndex, BigIntVector from) { BitVectorHelper.setValidityBit(validityBuffer, thisIndex, from.isSet(fromIndex)); final long value = from.valueBuffer.getLong(fromIndex * TYPE_WIDTH); valueBuffer.setLong(thisIndex * TYPE_WIDTH, value); }
public void copyFrom(int fromIndex, int thisIndex, UInt8Vector from) { BitVectorHelper.setValidityBit(validityBuffer, thisIndex, from.isSet(fromIndex)); final long value = from.valueBuffer.getLong(fromIndex * TYPE_WIDTH); valueBuffer.setLong(thisIndex * TYPE_WIDTH, value); }
/** * Copy a cell value from a particular index in source vector to a particular * position in this vector. * * @param fromIndex position to copy from in source vector * @param thisIndex position to copy to in this vector * @param from source vector */ public void copyFrom(int fromIndex, int thisIndex, TimeStampVector from) { BitVectorHelper.setValidityBit(validityBuffer, thisIndex, from.isSet(fromIndex)); final long value = from.valueBuffer.getLong(fromIndex * TYPE_WIDTH); valueBuffer.setLong(thisIndex * TYPE_WIDTH, value); }