public class JavaArray
extends java.lang.Object
Constructor and Description |
---|
JavaArray(Datatype dt,
int numElements)
Creates an empty JavaArray based on the given Datatype dt.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
get()
Returns the native Java array as Object
|
Datatype |
getDataType()
Returns the datatype
|
int |
getNumElements()
Returns the number of elements
|
void |
set(int position,
byte o)
Sets an element to a byte array
|
void |
set(int position,
byte[] o)
Appends the element of the input byte array
|
void |
set(int position,
double o)
Sets an element to a double array
|
void |
set(int position,
float o)
Sets an element to a float array
|
void |
set(int position,
int o)
Sets an element to an int array
|
void |
set(int position,
long o)
Sets an element to a long array
|
void |
set(int position,
short o)
Sets an element to a short array
|
public JavaArray(Datatype dt, int numElements) throws TileDBError
dt
- The DatatypenumElements
- The array capacity (number of elements)TileDBError
public java.lang.Object get()
public int getNumElements()
public void set(int position, int o) throws java.lang.ArrayIndexOutOfBoundsException
position
- The positiono
- The elementjava.lang.ArrayIndexOutOfBoundsException
public void set(int position, long o) throws java.lang.ArrayIndexOutOfBoundsException
position
- The positiono
- The elementjava.lang.ArrayIndexOutOfBoundsException
public void set(int position, float o) throws java.lang.ArrayIndexOutOfBoundsException
position
- The positiono
- The elementjava.lang.ArrayIndexOutOfBoundsException
public void set(int position, double o) throws java.lang.ArrayIndexOutOfBoundsException
position
- The positiono
- The elementjava.lang.ArrayIndexOutOfBoundsException
public void set(int position, byte o) throws java.lang.ArrayIndexOutOfBoundsException
position
- The positiono
- The elementjava.lang.ArrayIndexOutOfBoundsException
public void set(int position, short o) throws java.lang.ArrayIndexOutOfBoundsException
position
- The positiono
- The elementjava.lang.ArrayIndexOutOfBoundsException
public void set(int position, byte[] o) throws java.lang.ArrayIndexOutOfBoundsException
position
- The positiono
- The elementjava.lang.ArrayIndexOutOfBoundsException
public Datatype getDataType()