public class UInt2Vector extends BaseFixedWidthVector
field, lastValueCapacity, validityBuffer, valueBuffer, valueCount
allocator, INITIAL_VALUE_ALLOCATION, MAX_ALLOCATION_SIZE, MAX_ALLOCATION_SIZE_PROPERTY, name
コンストラクタと説明 |
---|
UInt2Vector(String name,
BufferAllocator allocator) |
UInt2Vector(String name,
FieldType fieldType,
BufferAllocator allocator) |
修飾子とタイプ | メソッドと説明 |
---|---|
void |
copyFrom(int fromIndex,
int thisIndex,
UInt2Vector from)
Copies a value and validity bit from the given vector to this one.
|
void |
copyFromSafe(int fromIndex,
int thisIndex,
UInt2Vector from)
Same as
copyFrom(int, int, UInt2Vector) but reallocate buffer if
index is larger than capacity. |
static char |
get(ArrowBuf buffer,
int index)
Given a data buffer, get the value stored at a particular position
in the vector.
|
char |
get(int index)
Get the element at the given index from the vector.
|
void |
get(int index,
NullableUInt2Holder holder)
Get the element at the given index from the vector and
sets the state in holder.
|
Types.MinorType |
getMinorType() |
Character |
getObject(int index)
Same as
get(int) . |
FieldReader |
getReader()
Get a reader for this vector.
|
TransferPair |
getTransferPair(String ref,
BufferAllocator allocator)
Construct a transfer pair of this vector and another vector of same type.
|
TransferPair |
makeTransferPair(ValueVector to)
Makes a new transfer pair used to transfer underlying buffers.
|
void |
set(int index,
char value)
Set the element at the given index to the given value.
|
void |
set(int index,
int value)
Set the element at the given index to the given value.
|
void |
set(int index,
int isSet,
char value)
Sets the given index to value is isSet is positive, otherwise sets
the position as invalid/null.
|
void |
set(int index,
NullableUInt2Holder holder)
Set the element at the given index to the value set in data holder.
|
void |
set(int index,
UInt2Holder holder)
Set the element at the given index to the value set in data holder.
|
void |
setNull(int index)
Set the element at the given index to null.
|
void |
setSafe(int index,
char value)
Same as
set(int, char) except that it handles the
case when index is greater than or equal to existing
value capacity BaseFixedWidthVector.getValueCapacity() . |
void |
setSafe(int index,
int value)
Same as
set(int, int) except that it handles the
case when index is greater than or equal to existing
value capacity BaseFixedWidthVector.getValueCapacity() . |
void |
setSafe(int index,
int isSet,
char value)
Same as
set(int, int, char) but will reallocate the buffer if index
is larger than current capacity. |
void |
setSafe(int index,
NullableUInt2Holder holder)
Same as
set(int, NullableUInt2Holder) except that it handles the
case when index is greater than or equal to existing
value capacity BaseFixedWidthVector.getValueCapacity() . |
void |
setSafe(int index,
UInt2Holder holder)
Same as
set(int, UInt2Holder) except that it handles the
case when index is greater than or equal to existing
value capacity BaseFixedWidthVector.getValueCapacity() . |
allocateNew, allocateNew, allocateNewSafe, clear, close, decrementAllocationMonitor, getBuffers, getBufferSize, getBufferSizeFor, getChildrenFromFields, getDataBuffer, getDataBufferAddress, getField, getFieldBuffers, getFieldInnerVectors, getNullCount, getOffsetBuffer, getOffsetBufferAddress, getTransferPair, getTransferPair, getValidityBuffer, getValidityBufferAddress, getValueCapacity, getValueCount, handleSafe, incrementAllocationMonitor, initializeChildrenFromFields, isNull, isSafe, isSet, loadFieldBuffers, reAlloc, reset, set, set, setIndexDefined, setInitialCapacity, setSafe, setSafe, setValueCount, splitAndTransferTo, transferTo, zeroVector
checkBufRefs, getAllocator, getValidityBufferSizeFromCount, iterator, releaseBuffer, toString, transferBuffer
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getAllocator
forEach, iterator, spliterator
public UInt2Vector(String name, BufferAllocator allocator)
public UInt2Vector(String name, FieldType fieldType, BufferAllocator allocator)
public FieldReader getReader()
ValueVector
field reader
that supports reading values
from this vector.public Types.MinorType getMinorType()
public static char get(ArrowBuf buffer, int index)
This method is mainly meant for integration tests.
buffer
- data bufferindex
- position of the element.public char get(int index) throws IllegalStateException
index
- position of elementIllegalStateException
public void get(int index, NullableUInt2Holder holder)
index
- position of elementpublic Character getObject(int index)
get(int)
.index
- position of elementpublic void copyFrom(int fromIndex, int thisIndex, UInt2Vector from)
public void copyFromSafe(int fromIndex, int thisIndex, UInt2Vector from)
copyFrom(int, int, UInt2Vector)
but reallocate buffer if
index is larger than capacity.public void set(int index, int value)
index
- position of elementvalue
- value of elementpublic void set(int index, char value)
index
- position of elementvalue
- value of elementpublic void set(int index, NullableUInt2Holder holder) throws IllegalArgumentException
index
- position of elementholder
- nullable data holder for value of elementIllegalArgumentException
public void set(int index, UInt2Holder holder)
index
- position of elementholder
- data holder for value of elementpublic void setSafe(int index, int value)
set(int, int)
except that it handles the
case when index is greater than or equal to existing
value capacity BaseFixedWidthVector.getValueCapacity()
.index
- position of elementvalue
- value of elementpublic void setSafe(int index, char value)
set(int, char)
except that it handles the
case when index is greater than or equal to existing
value capacity BaseFixedWidthVector.getValueCapacity()
.index
- position of elementvalue
- value of elementpublic void setSafe(int index, NullableUInt2Holder holder) throws IllegalArgumentException
set(int, NullableUInt2Holder)
except that it handles the
case when index is greater than or equal to existing
value capacity BaseFixedWidthVector.getValueCapacity()
.index
- position of elementholder
- nullable data holder for value of elementIllegalArgumentException
public void setSafe(int index, UInt2Holder holder)
set(int, UInt2Holder)
except that it handles the
case when index is greater than or equal to existing
value capacity BaseFixedWidthVector.getValueCapacity()
.index
- position of elementholder
- data holder for value of elementpublic void setNull(int index)
index
- position of elementpublic void set(int index, int isSet, char value)
public void setSafe(int index, int isSet, char value)
set(int, int, char)
but will reallocate the buffer if index
is larger than current capacity.public TransferPair getTransferPair(String ref, BufferAllocator allocator)
BaseFixedWidthVector
getTransferPair
インタフェース内 ValueVector
getTransferPair
クラス内 BaseFixedWidthVector
ref
- name of the target vectorallocator
- allocator for the target vectorpublic TransferPair makeTransferPair(ValueVector to)
ValueVector
to
- the target for the transfertransfer pair
that is used to transfer underlying
buffers into the target vector.Copyright © 2019 The Apache Software Foundation. All rights reserved.