public class GenericArray extends Object implements BaseArray
| Constructor and Description |
|---|
GenericArray(Object arr,
int numElements) |
GenericArray(Object arr,
int numElements,
boolean isPrimitiveArray) |
| Modifier and Type | Method and Description |
|---|---|
Object |
getArray() |
BaseArray |
getArray(int pos)
Get array value, internal format is BaseArray.
|
byte[] |
getBinary(int pos)
Get binary value, internal format is byte[].
|
boolean |
getBoolean(int pos)
Get boolean value.
|
byte |
getByte(int pos)
Get byte value.
|
Decimal |
getDecimal(int pos,
int precision,
int scale)
Get decimal value, internal format is Decimal.
|
double |
getDouble(int pos)
Get double value.
|
float |
getFloat(int pos)
Get float value.
|
<T> BinaryGeneric<T> |
getGeneric(int pos)
Get generic value, internal format is BinaryGeneric.
|
int |
getInt(int pos)
Get int value.
|
long |
getLong(int pos)
Get long value.
|
BaseMap |
getMap(int pos)
Get map value, internal format is BaseMap.
|
Object |
getObject(int pos) |
BaseRow |
getRow(int pos,
int numFields)
Get row value, internal format is BaseRow.
|
short |
getShort(int pos)
Get short value.
|
BinaryString |
getString(int pos)
Get string value, internal format is BinaryString.
|
boolean |
isNullAt(int pos)
Because the specific row implementation such as BinaryRow uses the binary format.
|
boolean |
isPrimitiveArray() |
int |
numElements() |
void |
setBoolean(int pos,
boolean value)
Set boolean value.
|
void |
setByte(int pos,
byte value)
Set byte value.
|
void |
setDecimal(int pos,
Decimal value,
int precision)
Set the decimal column value.
|
void |
setDouble(int pos,
double value)
Set double value.
|
void |
setFloat(int pos,
float value)
Set float value.
|
void |
setInt(int pos,
int value)
Set int value.
|
void |
setLong(int pos,
long value)
Set long value.
|
void |
setNotNullAt(int pos) |
void |
setNullAt(int pos)
Set null to this field.
|
void |
setNullBoolean(int pos) |
void |
setNullByte(int pos) |
void |
setNullDouble(int pos) |
void |
setNullFloat(int pos) |
void |
setNullInt(int pos) |
void |
setNullLong(int pos) |
void |
setNullShort(int pos) |
void |
setObject(int pos,
Object value) |
void |
setShort(int pos,
short value)
Set short value.
|
boolean[] |
toBooleanArray() |
byte[] |
toByteArray() |
double[] |
toDoubleArray() |
float[] |
toFloatArray() |
int[] |
toIntArray() |
long[] |
toLongArray() |
short[] |
toShortArray() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetpublic GenericArray(Object arr, int numElements)
public GenericArray(Object arr, int numElements, boolean isPrimitiveArray)
public boolean isPrimitiveArray()
public Object getArray()
public int numElements()
numElements in interface BaseArraypublic boolean isNullAt(int pos)
TypeGetterSettersisNullAt in interface BaseArrayisNullAt in interface TypeGetterSetterspublic void setNullAt(int pos)
TypeGetterSetterssetNullAt in interface BaseArraysetNullAt in interface TypeGetterSetterspublic void setNotNullAt(int pos)
setNotNullAt in interface BaseArraypublic void setNullLong(int pos)
setNullLong in interface BaseArraypublic void setNullInt(int pos)
setNullInt in interface BaseArraypublic void setNullBoolean(int pos)
setNullBoolean in interface BaseArraypublic void setNullByte(int pos)
setNullByte in interface BaseArraypublic void setNullShort(int pos)
setNullShort in interface BaseArraypublic void setNullFloat(int pos)
setNullFloat in interface BaseArraypublic void setNullDouble(int pos)
setNullDouble in interface BaseArraypublic boolean[] toBooleanArray()
toBooleanArray in interface BaseArraypublic byte[] toByteArray()
toByteArray in interface BaseArraypublic short[] toShortArray()
toShortArray in interface BaseArraypublic int[] toIntArray()
toIntArray in interface BaseArraypublic long[] toLongArray()
toLongArray in interface BaseArraypublic float[] toFloatArray()
toFloatArray in interface BaseArraypublic double[] toDoubleArray()
toDoubleArray in interface BaseArraypublic boolean getBoolean(int pos)
TypeGetterSettersgetBoolean in interface TypeGetterSetterspublic byte getByte(int pos)
TypeGetterSettersgetByte in interface TypeGetterSetterspublic short getShort(int pos)
TypeGetterSettersgetShort in interface TypeGetterSetterspublic int getInt(int pos)
TypeGetterSettersgetInt in interface TypeGetterSetterspublic long getLong(int pos)
TypeGetterSettersgetLong in interface TypeGetterSetterspublic float getFloat(int pos)
TypeGetterSettersgetFloat in interface TypeGetterSetterspublic double getDouble(int pos)
TypeGetterSettersgetDouble in interface TypeGetterSetterspublic byte[] getBinary(int pos)
TypeGetterSettersgetBinary in interface TypeGetterSetterspublic BinaryString getString(int pos)
TypeGetterSettersgetString in interface TypeGetterSetterspublic Decimal getDecimal(int pos, int precision, int scale)
TypeGetterSettersgetDecimal in interface TypeGetterSetterspublic <T> BinaryGeneric<T> getGeneric(int pos)
TypeGetterSettersgetGeneric in interface TypeGetterSetterspublic BaseRow getRow(int pos, int numFields)
TypeGetterSettersgetRow in interface TypeGetterSetterspublic BaseArray getArray(int pos)
TypeGetterSettersgetArray in interface TypeGetterSetterspublic BaseMap getMap(int pos)
TypeGetterSettersgetMap in interface TypeGetterSetterspublic void setBoolean(int pos,
boolean value)
TypeGetterSetterssetBoolean in interface TypeGetterSetterspublic void setByte(int pos,
byte value)
TypeGetterSetterssetByte in interface TypeGetterSetterspublic void setShort(int pos,
short value)
TypeGetterSetterssetShort in interface TypeGetterSetterspublic void setInt(int pos,
int value)
TypeGetterSetterssetInt in interface TypeGetterSetterspublic void setLong(int pos,
long value)
TypeGetterSetterssetLong in interface TypeGetterSetterspublic void setFloat(int pos,
float value)
TypeGetterSetterssetFloat in interface TypeGetterSetterspublic void setDouble(int pos,
double value)
TypeGetterSetterssetDouble in interface TypeGetterSetterspublic void setDecimal(int pos,
Decimal value,
int precision)
TypeGetterSettersNote: Precision is compact: can call setNullAt when decimal is null. Precision is not compact: can not call setNullAt when decimal is null, must call setDecimal(i, null, precision) because we need update var-length-part.
setDecimal in interface TypeGetterSetterspublic Object getObject(int pos)
public void setObject(int pos,
Object value)
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.