Package ucar.ma2
Class ArrayScalar
java.lang.Object
ucar.ma2.Array
ucar.ma2.ArrayScalar
Helper class for StructureDataAscii
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleangetBoolean(int elem) booleangetBoolean(Index ima) Get the array element at the current element of ima, as a boolean.bytegetByte(int elem) byteGet the array element at the current element of ima, as a byte.chargetChar(int elem) charGet the array element at the current element of ima, as a char.doublegetDouble(int elem) doubleGet the array element at the current element of ima, as a double.Get the element class type of this ArrayfloatgetFloat(int elem) floatGet the array element at the current element of ima, as a float.intgetInt(int elem) intGet the array element at the current element of ima, as a int.longgetLong(int elem) longGet the array element at the current element of ima, as a long.getObject(int elem) Get the array element at index as an Object.shortgetShort(int elem) shortGet the array element at the current element of ima, as a short.Get underlying primitive array storage.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) voidSet the array element at the current element of ima.voidsetChar(int elem, char value) voidSet the array element at the current element of ima.voidsetDouble(int elem, double val) voidSet the array element at the current element of ima.voidsetFloat(int elem, float val) voidSet the array element at the current element of ima.voidsetInt(int elem, int value) voidSet the array element at the current element of ima.voidsetLong(int elem, long value) voidSet the array element at the current element of ima.voidvoidSet the array element at index to the specified value.voidsetShort(int elem, short value) voidSet the array element at the current element of ima.Methods inherited from class ucar.ma2.Array
arraycopy, copy, copyTo1DJavaArray, copyToNDJavaArray, factory, factory, factory, factory, factoryConstant, factoryCopy, flip, get1DJavaArray, get1DJavaArray, getDataAsByteBuffer, getDataAsByteBuffer, getDataAsByteBuffer, getDataType, getIndex, getIndexIterator, getRangeIterator, getRank, getShape, getSize, getSizeBytes, hasNext, isConstant, isUnsigned, isVlen, 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
-
Constructor Details
-
ArrayScalar
-
-
Method Details
-
getElementType
Description copied from class:ArrayGet the element class type of this Array- Specified by:
getElementTypein classArray- Returns:
- the class of the element
-
getStorage
Description copied from class:ArrayGet underlying primitive array storage. Exposed for efficiency, use at your own risk.- Specified by:
getStoragein classArray- Returns:
- underlying primitive array storage
-
getDouble
Description copied from class:ArrayGet the array element at the current element of ima, as a double. -
setDouble
Description copied from class:ArraySet the array element at the current element of ima. -
getFloat
Description copied from class:ArrayGet the array element at the current element of ima, as a float. -
setFloat
Description copied from class:ArraySet the array element at the current element of ima. -
getLong
Description copied from class:ArrayGet the array element at the current element of ima, as a long. -
setLong
Description copied from class:ArraySet the array element at the current element of ima. -
getInt
Description copied from class:ArrayGet the array element at the current element of ima, as a int. -
setInt
Description copied from class:ArraySet the array element at the current element of ima. -
getShort
Description copied from class:ArrayGet the array element at the current element of ima, as a short. -
setShort
Description copied from class:ArraySet the array element at the current element of ima. -
getByte
Description copied from class:ArrayGet the array element at the current element of ima, as a byte. -
setByte
Description copied from class:ArraySet the array element at the current element of ima. -
getChar
Description copied from class:ArrayGet the array element at the current element of ima, as a char. -
setChar
Description copied from class:ArraySet the array element at the current element of ima. -
getBoolean
Description copied from class:ArrayGet the array element at the current element of ima, as a boolean.- Specified by:
getBooleanin classArray- Parameters:
ima- Index with current element set- Returns:
- value at
indexcast to boolean if necessary.
-
setBoolean
Description copied from class:ArraySet the array element at the current element of ima.- Specified by:
setBooleanin classArray- Parameters:
ima- Index with current element setvalue- the new value; cast to underlying data type if necessary.
-
getObject
Description copied from class:ArrayGet the array element at index as an Object. The returned value is wrapped in an object, eg Double for double -
setObject
Description copied from class:ArraySet the array element at index to the specified value. the value must be passed wrapped in the appropriate Object (eg Double for double) -
getDouble
public double getDouble(int elem) -
setDouble
public void setDouble(int elem, double val) -
getFloat
public float getFloat(int elem) -
setFloat
public void setFloat(int elem, float val) -
getLong
public long getLong(int elem) -
setLong
public void setLong(int elem, long value) -
getInt
public int getInt(int elem) -
setInt
public void setInt(int elem, int value) -
getShort
public short getShort(int elem) -
setShort
public void setShort(int elem, short value) -
getByte
public byte getByte(int elem) -
setByte
public void setByte(int elem, byte value) -
getChar
public char getChar(int elem) -
setChar
public void setChar(int elem, char value) -
getBoolean
public boolean getBoolean(int elem) - Specified by:
getBooleanin classArray
-
setBoolean
public void setBoolean(int elem, boolean value) - Specified by:
setBooleanin classArray
-
getObject
-
setObject
-