public class ArrayObject extends Array
Array
Modifier and Type | Class and Description |
---|---|
static class |
ArrayObject.D0
Concrete implementation of Array specialized for Objects, rank 0.
|
static class |
ArrayObject.D1
Concrete implementation of Array specialized for Objects, rank 1.
|
static class |
ArrayObject.D2
Concrete implementation of Array specialized for Objects, rank 2.
|
static class |
ArrayObject.D3
Concrete implementation of Array specialized for Objects, rank 3.
|
static class |
ArrayObject.D4
Concrete implementation of Array specialized for Objects, rank 4.
|
static class |
ArrayObject.D5
Concrete implementation of Array specialized for Objects, rank 5.
|
static class |
ArrayObject.D6
Concrete implementation of Array specialized for Objects, rank 6.
|
static class |
ArrayObject.D7
Concrete implementation of Array specialized for Objects, rank 7.
|
Constructor and Description |
---|
ArrayObject(DataType dtype,
Class elementType,
boolean isVlen,
int[] shape)
Create a new Array of type Object and the given shape.
|
ArrayObject(DataType dtype,
Class elementType,
boolean isVlen,
int[] shape,
Object[] storage)
Create a new Array of type Object and the given shape and storage.
|
Modifier and Type | Method and Description |
---|---|
Array |
copy()
Create a copy of this Array, copying the data so that physical order is the same as
logical order
|
boolean |
getBoolean(Index i)
not legal, throw ForbiddenConversionException
|
boolean |
getBoolean(int index) |
byte |
getByte(Index i)
not legal, throw ForbiddenConversionException
|
byte |
getByte(int index) |
char |
getChar(Index i)
not legal, throw ForbiddenConversionException
|
char |
getChar(int index) |
double |
getDouble(Index i)
not legal, throw ForbiddenConversionException
|
double |
getDouble(int index) |
Class |
getElementType()
Return the element class type
|
float |
getFloat(Index i)
not legal, throw ForbiddenConversionException
|
float |
getFloat(int index) |
int |
getInt(Index i)
not legal, throw ForbiddenConversionException
|
int |
getInt(int index) |
long |
getLong(Index i)
not legal, throw ForbiddenConversionException
|
long |
getLong(int index) |
Object |
getObject(Index i)
Get the array element at index as an Object.
|
Object |
getObject(int index) |
short |
getShort(Index i)
not legal, throw ForbiddenConversionException
|
short |
getShort(int index) |
Object |
getStorage()
Get underlying primitive array storage.
|
boolean |
isVlen() |
void |
setBoolean(Index i,
boolean value)
not legal, throw ForbiddenConversionException
|
void |
setBoolean(int index,
boolean value) |
void |
setByte(Index i,
byte value)
not legal, throw ForbiddenConversionException
|
void |
setByte(int index,
byte value) |
void |
setChar(Index i,
char value)
not legal, throw ForbiddenConversionException
|
void |
setChar(int index,
char value) |
void |
setDouble(Index i,
double value)
not legal, throw ForbiddenConversionException
|
void |
setDouble(int index,
double value) |
void |
setFloat(Index i,
float value)
not legal, throw ForbiddenConversionException
|
void |
setFloat(int index,
float value) |
void |
setInt(Index i,
int value)
not legal, throw ForbiddenConversionException
|
void |
setInt(int index,
int value) |
void |
setLong(Index i,
long value)
not legal, throw ForbiddenConversionException
|
void |
setLong(int index,
long value) |
void |
setObject(Index i,
Object value)
Set the array element at index to the specified value.
|
void |
setObject(int index,
Object value) |
void |
setShort(Index i,
short value)
not legal, throw ForbiddenConversionException
|
void |
setShort(int index,
short value) |
arraycopy, copyTo1DJavaArray, copyToNDJavaArray, factory, factory, factory, factory, factoryConstant, flip, get1DJavaArray, getDataAsByteBuffer, getDataAsByteBuffer, getDataAsByteBuffer, getDataType, getIndex, getIndexIterator, getRangeIterator, getRank, getShape, getSize, getSizeBytes, hasNext, isConstant, isUnsigned, makeArray, makeArray, makeArray, makeArrayRankPlusOne, makeFromJavaArray, makeFromJavaArray, makeObjectArray, makeVlenArray, next, nextBoolean, nextByte, nextChar, nextDouble, nextFloat, nextInt, nextLong, nextShort, permute, reduce, reduce, resetLocalIterator, reshape, reshapeNoCopy, section, section, section, sectionNoReduce, sectionNoReduce, shapeToString, slice, toString, transpose
public ArrayObject(DataType dtype, Class elementType, boolean isVlen, int[] shape)
elementType
- the type of element, eg Stringshape
- the shape of the Array.public ArrayObject(DataType dtype, Class elementType, boolean isVlen, int[] shape, Object[] storage)
elementType
- the type of element, eg Stringshape
- the shape of the Array.public Array copy()
Array
public boolean getBoolean(Index i)
getBoolean
in class Array
i
- Index with current element setindex
cast to boolean if necessary.public boolean getBoolean(int index)
getBoolean
in class Array
public byte getByte(Index i)
public char getChar(Index i)
public double getDouble(Index i)
public Class getElementType()
getElementType
in class Array
public float getFloat(Index i)
public int getInt(Index i)
public long getLong(Index i)
public Object getObject(Index i)
Array
public short getShort(Index i)
public Object getStorage()
getStorage
in class Array
public void setBoolean(Index i, boolean value)
setBoolean
in class Array
i
- Index with current element setvalue
- the new value; cast to underlying data type if necessary.public void setBoolean(int index, boolean value)
setBoolean
in class Array
public void setByte(Index i, byte value)
public void setChar(Index i, char value)
public void setDouble(Index i, double value)
public void setFloat(Index i, float value)
public void setInt(Index i, int value)
public void setLong(Index i, long value)
public void setObject(Index i, Object value)
Array
public void setShort(Index i, short value)