类 ArrayScalar
- java.lang.Object
-
- org.meteoinfo.ndarray.Array
-
- org.meteoinfo.ndarray.ArrayScalar
-
@Immutable public class ArrayScalar extends Array
Helper class for StructureDataAscii
-
-
构造器概要
构造器 构造器 说明 ArrayScalar(java.lang.Object value, boolean isUnsigned)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 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 Index and the same backing storebooleangetBoolean(int elem)booleangetBoolean(Index ima)Get the array element at the current element of ima, as a boolean.bytegetByte(int elem)bytegetByte(Index ima)Get the array element at the current element of ima, as a byte.chargetChar(int elem)chargetChar(Index ima)Get the array element at the current element of ima, as a char.ComplexgetComplex(int index)ComplexgetComplex(Index index)Get the array element at the current element of ima, as a complex.java.time.LocalDateTimegetDate(int index)java.time.LocalDateTimegetDate(Index i)Get the array element at the current element of ima, as a LocalDateTime.doublegetDouble(int elem)doublegetDouble(Index ima)Get the array element at the current element of ima, as a double.java.lang.ClassgetElementType()Get the element class type of this ArrayfloatgetFloat(int elem)floatgetFloat(Index ima)Get the array element at the current element of ima, as a float.intgetInt(int elem)intgetInt(Index ima)Get the array element at the current element of ima, as a int.longgetLong(int elem)longgetLong(Index ima)Get the array element at the current element of ima, as a long.java.lang.ObjectgetObject(int elem)java.lang.ObjectgetObject(Index ima)Get the array element at index as an Object.shortgetShort(int elem)shortgetShort(Index ima)Get the array element at the current element of ima, as a short.java.lang.Object[]getStorage()Get underlying primitive array storage.java.lang.StringgetString(int index)java.lang.StringgetString(Index index)Get the array element at the current element of ima, as a string.voidsetBoolean(int elem, boolean value)voidsetBoolean(Index ima, boolean value)Set the array element at the current element of ima.voidsetByte(int elem, byte value)voidsetByte(Index ima, byte value)Set the array element at the current element of ima.voidsetChar(int elem, char value)voidsetChar(Index ima, char value)Set the array element at the current element of ima.voidsetComplex(int index, Complex value)voidsetComplex(Index index, Complex value)Set the array element at the current element of ima.voidsetDate(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 elem, double val)voidsetDouble(Index ima, double value)Set the array element at the current element of ima.voidsetFloat(int elem, float val)voidsetFloat(Index ima, float value)Set the array element at the current element of ima.voidsetInt(int elem, int value)voidsetInt(Index ima, int value)Set the array element at the current element of ima.voidsetLong(int elem, long value)voidsetLong(Index ima, long value)Set the array element at the current element of ima.voidsetObject(int elem, java.lang.Object value)voidsetObject(Index ima, 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 elem, short value)voidsetShort(Index ima, short value)Set the array element at the current element of ima.voidsetString(int index, java.lang.String value)voidsetString(Index index, java.lang.String value)Set the array element at the current element of ima.-
从类继承的方法 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
-
-
-
-
方法详细资料
-
getElementType
public java.lang.Class getElementType()
从类复制的说明:ArrayGet the element class type of this Array- 指定者:
getElementType在类中Array- 返回:
- the class of the element
-
createView
protected Array createView(Index index)
从类复制的说明:Arraycreate new Array with given Index 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()
从类复制的说明:ArrayGet underlying primitive array storage. Exposed for efficiency, use at your own risk.- 指定者:
getStorage在类中Array- 返回:
- underlying primitive array storage
-
copyFrom1DJavaArray
protected void copyFrom1DJavaArray(IndexIterator iter, java.lang.Object javaArray)
- 指定者:
copyFrom1DJavaArray在类中Array
-
copyTo1DJavaArray
protected void copyTo1DJavaArray(IndexIterator iter, java.lang.Object javaArray)
- 指定者:
copyTo1DJavaArray在类中Array
-
getDouble
public double getDouble(Index ima)
从类复制的说明:ArrayGet the array element at the current element of ima, as a double.
-
setDouble
public void setDouble(Index ima, double value)
从类复制的说明:ArraySet the array element at the current element of ima.
-
getFloat
public float getFloat(Index ima)
从类复制的说明:ArrayGet the array element at the current element of ima, as a float.
-
setFloat
public void setFloat(Index ima, float value)
从类复制的说明:ArraySet the array element at the current element of ima.
-
getLong
public long getLong(Index ima)
从类复制的说明:ArrayGet the array element at the current element of ima, as a long.
-
setLong
public void setLong(Index ima, long value)
从类复制的说明:ArraySet the array element at the current element of ima.
-
getInt
public int getInt(Index ima)
从类复制的说明:ArrayGet the array element at the current element of ima, as a int.
-
setInt
public void setInt(Index ima, int value)
从类复制的说明:ArraySet the array element at the current element of ima.
-
getShort
public short getShort(Index ima)
从类复制的说明:ArrayGet the array element at the current element of ima, as a short.
-
setShort
public void setShort(Index ima, short value)
从类复制的说明:ArraySet the array element at the current element of ima.
-
getByte
public byte getByte(Index ima)
从类复制的说明:ArrayGet the array element at the current element of ima, as a byte.
-
setByte
public void setByte(Index ima, byte value)
从类复制的说明:ArraySet the array element at the current element of ima.
-
getChar
public char getChar(Index ima)
从类复制的说明:ArrayGet the array element at the current element of ima, as a char.
-
setChar
public void setChar(Index ima, char value)
从类复制的说明:ArraySet the array element at the current element of ima.
-
getBoolean
public boolean getBoolean(Index ima)
从类复制的说明:ArrayGet the array element at the current element of ima, as a boolean.- 指定者:
getBoolean在类中Array- 参数:
ima- Index with current element set- 返回:
- value at
indexcast to boolean if necessary.
-
setBoolean
public void setBoolean(Index ima, boolean value)
从类复制的说明:ArraySet the array element at the current element of ima.- 指定者:
setBoolean在类中Array- 参数:
ima- Index with current element setvalue- the new value; cast to underlying data type if necessary.
-
getString
public java.lang.String getString(Index index)
从类复制的说明:ArrayGet the array element at the current element of ima, as a string.
-
setString
public void setString(Index index, java.lang.String value)
从类复制的说明:ArraySet the array element at the current element of ima.
-
getComplex
public Complex getComplex(Index index)
从类复制的说明:ArrayGet the array element at the current element of ima, as a complex.- 指定者:
getComplex在类中Array- 参数:
index- Index with current element set- 返回:
- value at
indexcast to boolean if necessary.
-
setComplex
public void setComplex(Index index, Complex value)
从类复制的说明:ArraySet the array element at the current element of ima.- 指定者:
setComplex在类中Array- 参数:
index- 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.
-
getObject
public java.lang.Object getObject(Index ima)
从类复制的说明: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 ima, 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 elem)
- 指定者:
getBoolean在类中Array
-
setBoolean
public void setBoolean(int elem, boolean value)- 指定者:
setBoolean在类中Array
-
getComplex
public Complex getComplex(int index)
- 指定者:
getComplex在类中Array
-
setComplex
public void setComplex(int index, Complex value)- 指定者:
setComplex在类中Array
-
-