类 ArrayString
- java.lang.Object
-
- org.meteoinfo.ndarray.Array
-
- org.meteoinfo.ndarray.ArrayString
-
- 直接已知子类:
ArrayString.D0,ArrayString.D1,ArrayString.D2,ArrayString.D3,ArrayString.D4,ArrayString.D5,ArrayString.D6,ArrayString.D7
public class ArrayString extends Array
Concrete implementation of Array specialized for Strings. Data storage is with 1D java array of Strings.- 作者:
- Heimbigner
- 另请参阅:
Array
-
-
嵌套类概要
嵌套类 修饰符和类型 类 说明 static classArrayString.D0Concrete implementation of Array specialized for String, rank 0.static classArrayString.D1Concrete implementation of Array specialized for Strings, rank 1.static classArrayString.D2Concrete implementation of Array specialized for Strings, rank 2.static classArrayString.D3Concrete implementation of Array specialized for Strings, rank 3.static classArrayString.D4Concrete implementation of Array specialized for Strings, rank 4.static classArrayString.D5Concrete implementation of Array specialized for Strings, rank 5.static classArrayString.D6Concrete implementation of Array specialized for Strings, rank 6.static classArrayString.D7Concrete implementation of Array specialized for Strings, rank 7.
-
构造器概要
构造器 构造器 说明 ArrayString(int[] dimensions)Create a new Array of type long and the given shape. dimensions.length determines the rank of the new Array.
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected voidcopyFrom1DJavaArray(IndexIterator iter, Object javaArray)protected voidcopyTo1DJavaArray(IndexIterator iter, Object javaArray)protected ArraycreateView(Index index)create new Array with given indexImpl and same backing storeStringget(Index i)get the value at the specified index.booleangetBoolean(int index)booleangetBoolean(Index i)get the boolean value at the specified index.bytegetByte(int index)bytegetByte(Index i)get the byte value at the specified index.chargetChar(int index)chargetChar(Index i)get the char value at the specified index.ComplexgetComplex(int index)ComplexgetComplex(Index i)Get the array element at the current element of ima, as a complex.ByteBuffergetDataAsByteBuffer()This gets the data as a ByteBuffer, in correct order.LocalDateTimegetDate(int index)LocalDateTimegetDate(Index i)Get the array element at the current element of ima, as a LocalDateTime.doublegetDouble(int index)doublegetDouble(Index i)get the double value at the specified index.ClassgetElementType()Return the element class typefloatgetFloat(int index)floatgetFloat(Index i)get the float value at the specified index.intgetInt(int index)intgetInt(Index i)get the integer value at the specified index.longgetLong(int index)longgetLong(Index i)get the long value at the specified index.ObjectgetObject(int index)ObjectgetObject(Index i)Get the array element at index as an Object.shortgetShort(int index)shortgetShort(Index i)get the short value at the specified index.Object[]getStorage()Get underlying primitive array storage.StringgetString(int index)StringgetString(Index i)Get the array element at the current element of ima, as a string.voidset(Index i, String value)set the value at the specified index.voidsetBoolean(int index, boolean value)voidsetBoolean(Index i, boolean value)set the value at the specified index.voidsetByte(int index, byte value)voidsetByte(Index i, byte value)set the value at the specified index.voidsetChar(int index, char value)voidsetChar(Index i, char value)set the value at the specified index.voidsetComplex(int index, Complex value)voidsetComplex(Index i, Complex value)Set the array element at the current element of ima.voidsetDate(int index, LocalDateTime value)voidsetDate(Index i, LocalDateTime value)Set the array element at the current element of ima.voidsetDouble(int index, double value)voidsetDouble(Index i, double value)set the value at the specified index.voidsetFloat(int index, float value)voidsetFloat(Index i, float value)set the value at the specified index.voidsetInt(int index, int value)voidsetInt(Index i, int value)set the value at the specified index.voidsetLong(int index, long value)voidsetLong(Index i, long value)set the value at the specified index.voidsetObject(int index, Object value)voidsetObject(Index i, 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)set the value at the specified index.voidsetString(int index, String value)voidsetString(Index i, 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, 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
-
-
-
-
字段详细资料
-
storage
protected String[] storage
-
-
方法详细资料
-
createView
protected Array createView(Index index)
create new Array with given indexImpl and same backing store- 指定者:
createView在类中Array- 参数:
index- use this Index- 返回:
- a view of the Array using the given Index
-
getStorage
public 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, Object javaArray)
- 指定者:
copyFrom1DJavaArray在类中Array
-
copyTo1DJavaArray
protected void copyTo1DJavaArray(IndexIterator iter, Object javaArray)
- 指定者:
copyTo1DJavaArray在类中Array
-
getDataAsByteBuffer
public ByteBuffer getDataAsByteBuffer()
从类复制的说明:ArrayThis gets the data as a ByteBuffer, in correct order. It avoids copying if possible. Only for numeric types (byte, short, int, long, double, float)- 覆盖:
getDataAsByteBuffer在类中Array- 返回:
- equivilent data in a ByteBuffer
-
getElementType
public Class getElementType()
Return the element class type- 指定者:
getElementType在类中Array- 返回:
- the class of the element
-
getDouble
public double getDouble(Index i)
get the double value at the specified index.
-
setDouble
public void setDouble(Index i, double value)
set the value at the specified index.
-
getFloat
public float getFloat(Index i)
get the float value at the specified index.
-
setFloat
public void setFloat(Index i, float value)
set the value at the specified index.
-
getLong
public long getLong(Index i)
get the long value at the specified index.
-
setLong
public void setLong(Index i, long value)
set the value at the specified index.
-
getInt
public int getInt(Index i)
get the integer value at the specified index.
-
setInt
public void setInt(Index i, int value)
set the value at the specified index.
-
getShort
public short getShort(Index i)
get the short value at the specified index.
-
setShort
public void setShort(Index i, short value)
set the value at the specified index.
-
getByte
public byte getByte(Index i)
get the byte value at the specified index.
-
setByte
public void setByte(Index i, byte value)
set the value at the specified index.
-
getBoolean
public boolean getBoolean(Index i)
get the boolean value at the specified index.- 指定者:
getBoolean在类中Array- 参数:
i- Index with current element set- 返回:
- value at
indexcast to boolean if necessary.
-
setBoolean
public void setBoolean(Index i, boolean value)
set the value at the specified index.- 指定者:
setBoolean在类中Array- 参数:
i- Index with current element setvalue- the new value; cast to underlying data type if necessary.
-
getChar
public char getChar(Index i)
get the char value at the specified index.
-
setChar
public void setChar(Index i, char value)
set the value at the specified index.
-
getString
public String getString(Index i)
从类复制的说明:ArrayGet the array element at the current element of ima, as a string.
-
setString
public void setString(Index i, String value)
从类复制的说明:ArraySet the array element at the current element of ima.
-
getComplex
public Complex getComplex(Index i)
从类复制的说明:ArrayGet the array element at the current element of ima, as a complex.- 指定者:
getComplex在类中Array- 参数:
i- Index with current element set- 返回:
- value at
indexcast to boolean if necessary.
-
setComplex
public void setComplex(Index i, Complex value)
从类复制的说明:ArraySet the array element at the current element of ima.- 指定者:
setComplex在类中Array- 参数:
i- Index with current element setvalue- the new value; cast to underlying data type if necessary.
-
getDate
public LocalDateTime getDate(Index i)
从类复制的说明:ArrayGet the array element at the current element of ima, as a LocalDateTime.
-
setDate
public void setDate(Index i, LocalDateTime value)
从类复制的说明:ArraySet the array element at the current element of ima.
-
getObject
public 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, 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
-
getDate
public LocalDateTime getDate(int index)
-
setDate
public void setDate(int index, LocalDateTime value)
-
-