|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.ma2.Array
ucar.ma2.ArrayObject
public class ArrayObject
Concrete implementation of Array specialized for Objects. Data storage is with 1D java array of Objects.
Array| Nested Class Summary | |
|---|---|
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 Summary | |
|---|---|
ArrayObject(java.lang.Class elementType,
int[] shape)
Create a new Array of type Object and the given shape. |
|
ArrayObject(java.lang.Class elementType,
int[] shape,
java.lang.Object[] storage)
Create a new Array of type Object and the given shape and storage. |
|
| Method Summary | |
|---|---|
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)
|
java.lang.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)
|
java.lang.Object |
getObject(Index i)
Get the array element at index as an Object. |
java.lang.Object |
getObject(int index)
|
short |
getShort(Index i)
not legal, throw ForbiddenConversionException |
short |
getShort(int index)
|
java.lang.Object |
getStorage()
Get underlying primitive array storage. |
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,
java.lang.Object value)
Set the array element at index to the specified value. |
void |
setObject(int index,
java.lang.Object value)
|
void |
setShort(Index i,
short value)
not legal, throw ForbiddenConversionException |
void |
setShort(int index,
short value)
|
| Methods inherited from class ucar.ma2.Array |
|---|
arraycopy, copy, copyTo1DJavaArray, copyToNDJavaArray, factory, factory, factory, factory, factory, factory, factoryConstant, flip, get1DJavaArray, getDataAsByteBuffer, getIndex, getIndexIterator, getIndexIteratorFast, getIndexPrivate, getRangeIterator, getRank, getShape, getSize, getSizeBytes, hasNext, isConstant, isUnsigned, makeArray, makeArray, makeArray, next, nextBoolean, nextByte, nextChar, nextDouble, nextFloat, nextInt, nextLong, nextShort, permute, reduce, reduce, resetLocalIterator, reshape, reshapeNoCopy, section, section, section, sectionNoReduce, sectionNoReduce, setUnsigned, shapeToString, slice, toString, transpose |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ArrayObject(java.lang.Class elementType,
int[] shape)
elementType - the type of element, eg Stringshape - the shape of the Array.
public ArrayObject(java.lang.Class elementType,
int[] shape,
java.lang.Object[] storage)
elementType - the type of element, eg Stringshape - the shape of the Array.| Method Detail |
|---|
public java.lang.Object getStorage()
getStorage in class Arraypublic java.lang.Class getElementType()
getElementType in class Arraypublic double getDouble(Index i)
getDouble in class Arrayi - Index with current element set
index cast to double if necessary.
public void setDouble(Index i,
double value)
setDouble in class Arrayi - Index with current element setvalue - the new value; cast to underlying data type if necessary.public float getFloat(Index i)
getFloat in class Arrayi - Index with current element set
index cast to float if necessary.
public void setFloat(Index i,
float value)
setFloat in class Arrayi - Index with current element setvalue - the new value; cast to underlying data type if necessary.public long getLong(Index i)
getLong in class Arrayi - Index with current element set
index cast to long if necessary.
public void setLong(Index i,
long value)
setLong in class Arrayi - Index with current element setvalue - the new value; cast to underlying data type if necessary.public int getInt(Index i)
getInt in class Arrayi - Index with current element set
index cast to int if necessary.
public void setInt(Index i,
int value)
setInt in class Arrayi - Index with current element setvalue - the new value; cast to underlying data type if necessary.public short getShort(Index i)
getShort in class Arrayi - Index with current element set
index cast to short if necessary.
public void setShort(Index i,
short value)
setShort in class Arrayi - Index with current element setvalue - the new value; cast to underlying data type if necessary.public byte getByte(Index i)
getByte in class Arrayi - Index with current element set
index cast to float if necessary.
public void setByte(Index i,
byte value)
setByte in class Arrayi - Index with current element setvalue - the new value; cast to underlying data type if necessary.public boolean getBoolean(Index i)
getBoolean in class Arrayi - Index with current element set
index cast to boolean if necessary.
public void setBoolean(Index i,
boolean value)
setBoolean in class Arrayi - Index with current element setvalue - the new value; cast to underlying data type if necessary.public char getChar(Index i)
getChar in class Arrayi - Index with current element set
index cast to char if necessary.
public void setChar(Index i,
char value)
setChar in class Arrayi - Index with current element setvalue - the new value; cast to underlying data type if necessary.public java.lang.Object getObject(Index i)
Array
getObject in class Arrayi - element Index
index
public void setObject(Index i,
java.lang.Object value)
Array
setObject in class Arrayi - Index with current element setvalue - the new value.public double getDouble(int index)
getDouble in class Array
public void setDouble(int index,
double value)
setDouble in class Arraypublic float getFloat(int index)
getFloat in class Array
public void setFloat(int index,
float value)
setFloat in class Arraypublic long getLong(int index)
getLong in class Array
public void setLong(int index,
long value)
setLong in class Arraypublic int getInt(int index)
getInt in class Array
public void setInt(int index,
int value)
setInt in class Arraypublic short getShort(int index)
getShort in class Array
public void setShort(int index,
short value)
setShort in class Arraypublic byte getByte(int index)
getByte in class Array
public void setByte(int index,
byte value)
setByte in class Arraypublic char getChar(int index)
getChar in class Array
public void setChar(int index,
char value)
setChar in class Arraypublic boolean getBoolean(int index)
getBoolean in class Array
public void setBoolean(int index,
boolean value)
setBoolean in class Arraypublic java.lang.Object getObject(int index)
getObject in class Array
public void setObject(int index,
java.lang.Object value)
setObject in class Array
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||