类 ArrayObject
- java.lang.Object
-
- org.meteoinfo.ndarray.Array
-
- org.meteoinfo.ndarray.ArrayObject
-
- 直接已知子类:
ArrayObject.D0,ArrayObject.D1,ArrayObject.D2,ArrayObject.D3,ArrayObject.D4,ArrayObject.D5,ArrayObject.D6,ArrayObject.D7
public class ArrayObject extends Array
Concrete implementation of Array specialized for Objects. Data storage is with 1D java array of Objects.- 作者:
- caron
- 另请参阅:
Array
-
-
嵌套类概要
嵌套类 修饰符和类型 类 说明 static classArrayObject.D0Concrete implementation of Array specialized for Objects, rank 0.static classArrayObject.D1Concrete implementation of Array specialized for Objects, rank 1.static classArrayObject.D2Concrete implementation of Array specialized for Objects, rank 2.static classArrayObject.D3Concrete implementation of Array specialized for Objects, rank 3.static classArrayObject.D4Concrete implementation of Array specialized for Objects, rank 4.static classArrayObject.D5Concrete implementation of Array specialized for Objects, rank 5.static classArrayObject.D6Concrete implementation of Array specialized for Objects, rank 6.static classArrayObject.D7Concrete implementation of Array specialized for Objects, rank 7.
-
构造器概要
构造器 构造器 说明 ArrayObject(DataType dtype, java.lang.Class elementType, boolean isVlen, int[] shape)Create a new Array of type Object and the given shape.ArrayObject(DataType dtype, java.lang.Class elementType, boolean isVlen, int[] shape, java.lang.Object[] storage)Create a new Array of type Object and the given shape and storage.
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected voidcopyFrom1DJavaArray(IndexIterator iter, java.lang.Object javaArray)protected voidcopyTo1DJavaArray(IndexIterator iter, java.lang.Object javaArray)protected ArraycreateView(Index index)create new Array with given indexImpl and the same backing storebooleangetBoolean(int index)booleangetBoolean(Index i)not legal, throw ForbiddenConversionExceptionbytegetByte(int index)bytegetByte(Index i)not legal, throw ForbiddenConversionExceptionchargetChar(int index)chargetChar(Index i)not legal, throw ForbiddenConversionExceptionComplexgetComplex(int index)ComplexgetComplex(Index i)not legal, throw ForbiddenConversionExceptionjava.time.LocalDateTimegetDate(int index)java.time.LocalDateTimegetDate(Index i)Get the array element at the current element of ima, as a LocalDateTime.doublegetDouble(int index)doublegetDouble(Index i)not legal, throw ForbiddenConversionExceptionjava.lang.ClassgetElementType()Return the element class typefloatgetFloat(int index)floatgetFloat(Index i)not legal, throw ForbiddenConversionExceptionintgetInt(int index)intgetInt(Index i)not legal, throw ForbiddenConversionExceptionlonggetLong(int index)longgetLong(Index i)not legal, throw ForbiddenConversionExceptionjava.lang.ObjectgetObject(int index)java.lang.ObjectgetObject(Index i)Get the array element at index as an Object.shortgetShort(int index)shortgetShort(Index i)not legal, throw ForbiddenConversionExceptionjava.lang.Object[]getStorage()Get underlying primitive array storage.java.lang.StringgetString(int index)java.lang.StringgetString(Index i)not legal, throw ForbiddenConversionExceptionvoidsetBoolean(int index, boolean value)voidsetBoolean(Index i, boolean value)not legal, throw ForbiddenConversionExceptionvoidsetByte(int index, byte value)voidsetByte(Index i, byte value)not legal, throw ForbiddenConversionExceptionvoidsetChar(int index, char value)voidsetChar(Index i, char value)not legal, throw ForbiddenConversionExceptionvoidsetComplex(int index, Complex value)voidsetComplex(Index i, Complex value)not legal, throw ForbiddenConversionExceptionvoidsetDate(int index, java.time.LocalDateTime value)voidsetDate(Index i, java.time.LocalDateTime value)Set the array element at the current element of ima.voidsetDouble(int index, double value)voidsetDouble(Index i, double value)not legal, throw ForbiddenConversionExceptionvoidsetFloat(int index, float value)voidsetFloat(Index i, float value)not legal, throw ForbiddenConversionExceptionvoidsetInt(int index, int value)voidsetInt(Index i, int value)not legal, throw ForbiddenConversionExceptionvoidsetLong(int index, long value)voidsetLong(Index i, long value)not legal, throw ForbiddenConversionExceptionvoidsetObject(int index, java.lang.Object value)voidsetObject(Index i, java.lang.Object value)Set the array element at index to the specified value. the value must be passed wrapped in the appropriate Object (eg Double for double)voidsetShort(int index, short value)voidsetShort(Index i, short value)not legal, throw ForbiddenConversionExceptionvoidsetString(int index, java.lang.String value)voidsetString(Index i, java.lang.String value)not legal, throw ForbiddenConversionException-
从类继承的方法 org.meteoinfo.ndarray.Array
arraycopy, copy, copyIfView, copyTo1DJavaArray, copyToNDJavaArray, factory, factory, factory, factory, factory, factory, factory, factory, factoryConstant, flip, get1DJavaArray, getDataAsByteBuffer, getDataAsByteBuffer, getDataAsByteBuffer, getDataType, getIndex, getIndexIterator, getIndexIteratorFast, getIndexPrivate, getRangeIterator, getRank, getShape, getSize, getSizeBytes, hasNext, isConstant, isUnsigned, isView, makeArray, makeArray, makeArray, makeArray, makeArrayRankPlusOne, next, nextBoolean, nextByte, nextChar, nextDouble, nextFloat, nextInt, nextLong, nextShort, permute, reduce, reduce, resetLocalIterator, reshape, reshapeNoCopy, reshapeVLen, section, section, section, sectionNoReduce, sectionNoReduce, shapeToString, slice, toString, transpose
-
-
-
-
构造器详细资料
-
ArrayObject
public ArrayObject(DataType dtype, java.lang.Class elementType, boolean isVlen, int[] shape)
Create a new Array of type Object and the given shape. dimensions.length determines the rank of the new Array.- 参数:
elementType- the type of element, eg Stringshape- the shape of the Array.
-
ArrayObject
public ArrayObject(DataType dtype, java.lang.Class elementType, boolean isVlen, int[] shape, java.lang.Object[] storage)
Create a new Array of type Object and the given shape and storage. dimensions.length determines the rank of the new Array.- 参数:
elementType- the type of element, eg Stringshape- the shape of the Array.
-
-
方法详细资料
-
createView
protected Array createView(Index index)
create new Array with given indexImpl and the same backing store- 指定者:
createView在类中Array- 参数:
index- use this Index- 返回:
- a view of the Array using the given Index
-
getStorage
public java.lang.Object[] getStorage()
Get underlying primitive array storage. CAUTION! You may invalidate your warrentee!- 指定者:
getStorage在类中Array- 返回:
-
copyFrom1DJavaArray
protected void copyFrom1DJavaArray(IndexIterator iter, java.lang.Object javaArray)
- 指定者:
copyFrom1DJavaArray在类中Array
-
copyTo1DJavaArray
protected void copyTo1DJavaArray(IndexIterator iter, java.lang.Object javaArray)
- 指定者:
copyTo1DJavaArray在类中Array
-
getElementType
public java.lang.Class getElementType()
Return the element class type- 指定者:
getElementType在类中Array- 返回:
- Element type
-
getDouble
public double getDouble(Index i)
not legal, throw ForbiddenConversionException
-
setDouble
public void setDouble(Index i, double value)
not legal, throw ForbiddenConversionException
-
getFloat
public float getFloat(Index i)
not legal, throw ForbiddenConversionException
-
setFloat
public void setFloat(Index i, float value)
not legal, throw ForbiddenConversionException
-
getLong
public long getLong(Index i)
not legal, throw ForbiddenConversionException
-
setLong
public void setLong(Index i, long value)
not legal, throw ForbiddenConversionException
-
getInt
public int getInt(Index i)
not legal, throw ForbiddenConversionException
-
setInt
public void setInt(Index i, int value)
not legal, throw ForbiddenConversionException
-
getShort
public short getShort(Index i)
not legal, throw ForbiddenConversionException
-
setShort
public void setShort(Index i, short value)
not legal, throw ForbiddenConversionException
-
getByte
public byte getByte(Index i)
not legal, throw ForbiddenConversionException
-
setByte
public void setByte(Index i, byte value)
not legal, throw ForbiddenConversionException
-
getBoolean
public boolean getBoolean(Index i)
not legal, throw ForbiddenConversionException- 指定者:
getBoolean在类中Array- 参数:
i- Index with current element set- 返回:
- value at
indexcast to boolean if necessary.
-
setBoolean
public void setBoolean(Index i, boolean value)
not legal, throw ForbiddenConversionException- 指定者:
setBoolean在类中Array- 参数:
i- Index with current element setvalue- the new value; cast to underlying data type if necessary.
-
getString
public java.lang.String getString(Index i)
not legal, throw ForbiddenConversionException
-
setString
public void setString(Index i, java.lang.String value)
not legal, throw ForbiddenConversionException
-
getComplex
public Complex getComplex(Index i)
not legal, throw ForbiddenConversionException- 指定者:
getComplex在类中Array- 参数:
i- Index with current element set- 返回:
- value at
indexcast to boolean if necessary.
-
setComplex
public void setComplex(Index i, Complex value)
not legal, throw ForbiddenConversionException- 指定者:
setComplex在类中Array- 参数:
i- Index with current element setvalue- the new value; cast to underlying data type if necessary.
-
getDate
public java.time.LocalDateTime getDate(Index i)
从类复制的说明:ArrayGet the array element at the current element of ima, as a LocalDateTime.
-
setDate
public void setDate(Index i, java.time.LocalDateTime value)
从类复制的说明:ArraySet the array element at the current element of ima.
-
getChar
public char getChar(Index i)
not legal, throw ForbiddenConversionException
-
setChar
public void setChar(Index i, char value)
not legal, throw ForbiddenConversionException
-
getObject
public java.lang.Object getObject(Index i)
从类复制的说明:ArrayGet the array element at index as an Object. The returned value is wrapped in an object, eg Double for double
-
setObject
public void setObject(Index i, java.lang.Object value)
从类复制的说明:ArraySet the array element at index to the specified value. the value must be passed wrapped in the appropriate Object (eg Double for double)
-
getBoolean
public boolean getBoolean(int index)
- 指定者:
getBoolean在类中Array
-
setBoolean
public void setBoolean(int index, boolean value)- 指定者:
setBoolean在类中Array
-
getComplex
public Complex getComplex(int index)
- 指定者:
getComplex在类中Array
-
setComplex
public void setComplex(int index, Complex value)- 指定者:
setComplex在类中Array
-
-