public static class ProductData.Double extends ProductData
ProductData.Float class is a ProductData specialisation for 64-bit floating point
fields.
Internally, data is stored in an array of the type double[].
ProductData.ASCII, ProductData.Byte, ProductData.Double, ProductData.Float, ProductData.Int, ProductData.Short, ProductData.UByte, ProductData.UInt, ProductData.UShort, ProductData.UTC| Modifier and Type | Field and Description |
|---|---|
protected double[] |
_array
The internal data array holding this value's data elements.
|
TYPE_ASCII, TYPE_FLOAT32, TYPE_FLOAT64, TYPE_INT16, TYPE_INT32, TYPE_INT8, TYPE_UINT16, TYPE_UINT32, TYPE_UINT8, TYPE_UNDEFINED, TYPE_UTC, TYPESTRING_ASCII, TYPESTRING_FLOAT32, TYPESTRING_FLOAT64, TYPESTRING_INT16, TYPESTRING_INT32, TYPESTRING_INT8, TYPESTRING_UINT16, TYPESTRING_UINT32, TYPESTRING_UINT8, TYPESTRING_UTC| Constructor and Description |
|---|
ProductData.Double(double[] array)
Constructs a new
Double instance for the given array reference. |
ProductData.Double(int numElems)
Constructs a new
Double instance with the given number of elements. |
| Modifier and Type | Method and Description |
|---|---|
protected ProductData |
createDeepClone()
Retuns a "deep" copy of this product data.
|
void |
dispose()
Releases all of the resources used by this object instance and all of its owned children.
|
double[] |
getArray()
Returns the internal data array holding this value's data elements.
|
double |
getElemDoubleAt(int index)
Please refer to
ProductData.getElemDoubleAt(int). |
float |
getElemFloatAt(int index)
Please refer to
ProductData.getElemFloatAt(int). |
int |
getElemIntAt(int index)
Please refer to
ProductData.getElemIntAt(int). |
Object |
getElems()
Gets the actual value value(s).
|
String |
getElemStringAt(int index)
Please refer to
ProductData.getElemStringAt(int). |
long |
getElemUIntAt(int index)
Please refer to
ProductData.getElemUIntAt(int). |
int |
getNumElems()
Returns the number of data elements this value has.
|
void |
readFrom(int startPos,
int numElems,
ImageInputStream source)
Please refer to
ProductData.readFrom(int, int, ImageInputStream). |
void |
setElemDoubleAt(int index,
double value)
Please refer to
ProductData.setElemDoubleAt(int, double). |
void |
setElemFloatAt(int index,
float value)
Please refer to
ProductData.setElemFloatAt(int, float). |
void |
setElemIntAt(int index,
int value)
Please refer to
ProductData.setElemIntAt(int, int). |
void |
setElems(Object data)
Sets the data of this value.
|
void |
setElemUIntAt(int index,
long value)
Please refer to
ProductData.setElemUIntAt(int, long). |
void |
writeTo(int sourceStartPos,
int numSourceElems,
ImageOutputStream destination)
Please refer to
ProductData.writeTo(int, int, ImageOutputStream). |
createInstance, createInstance, createInstance, createInstance, createInstance, createInstance, createInstance, createInstance, createInstance, createInstance, createUnsignedInstance, createUnsignedInstance, createUnsignedInstance, equalElems, equals, getElemBoolean, getElemBooleanAt, getElemDouble, getElemFloat, getElemInt, getElemSize, getElemSize, getElemString, getElemUInt, getType, getType, getTypeString, getTypeString, hashCode, isFloatingPointType, isInt, isIntType, isScalar, isSigned, isUIntType, isUnsigned, readFrom, readFrom, readFrom, setElemBoolean, setElemBooleanAt, setElemDouble, setElemFloat, setElemInt, setElemString, setElemStringAt, setElemUInt, toString, writeTo, writeTo, writeToprotected double[] _array
public ProductData.Double(double[] array)
Double instance for the given array reference.array - the array referencepublic ProductData.Double(int numElems)
Double instance with the given number of elements.numElems - the number of elements, must not be less than oneprotected ProductData createDeepClone()
createDeepClone in class ProductDatapublic int getNumElems()
getNumElems in class ProductDatapublic int getElemIntAt(int index)
ProductData.getElemIntAt(int).getElemIntAt in class ProductDataindex - the value index, must be >=0 and <getNumDataElems()public long getElemUIntAt(int index)
ProductData.getElemUIntAt(int).getElemUIntAt in class ProductDataindex - the value index, must be >=0 and <getNumDataElems()public float getElemFloatAt(int index)
ProductData.getElemFloatAt(int).getElemFloatAt in class ProductDataindex - the value index, must be >=0 and <getNumDataElems()public double getElemDoubleAt(int index)
ProductData.getElemDoubleAt(int).getElemDoubleAt in class ProductDataindex - the value index, must be >=0 and <getNumDataElems()public String getElemStringAt(int index)
ProductData.getElemStringAt(int).getElemStringAt in class ProductDataindex - the value index, must be >=0 and <getNumDataElems()public void setElemIntAt(int index,
int value)
ProductData.setElemIntAt(int, int).setElemIntAt in class ProductDataindex - the value index, must be >=0 and <getNumDataElems()value - the value to be setpublic void setElemUIntAt(int index,
long value)
ProductData.setElemUIntAt(int, long).setElemUIntAt in class ProductDataindex - the value index, must be >=0 and <getNumDataElems()value - the value to be setpublic void setElemFloatAt(int index,
float value)
ProductData.setElemFloatAt(int, float).setElemFloatAt in class ProductDataindex - the value index, must be >=0 and <getNumDataElems()value - the value to be setpublic void setElemDoubleAt(int index,
double value)
ProductData.setElemDoubleAt(int, double).setElemDoubleAt in class ProductDataindex - the value index, must be >=0 and <getNumDataElems()value - the value to be setpublic final double[] getArray()
nullpublic Object getElems()
double[].getElems in class ProductDatadouble[], never nullpublic void setElems(Object data)
float[] or
String[] and have a length that is equal to the value returned by the
getNumDataElems method.setElems in class ProductDatadata - the data arrayIllegalArgumentException - if data is null or it is not an array of the required type or
does not have the required array length.public void readFrom(int startPos,
int numElems,
ImageInputStream source)
throws IOException
ProductData.readFrom(int, int, ImageInputStream).readFrom in class ProductDatastartPos - the destination start position (zero-based)numElems - the number of elements to readsource - a seekable data input streamIOException - if an I/O error occurspublic void writeTo(int sourceStartPos,
int numSourceElems,
ImageOutputStream destination)
throws IOException
ProductData.writeTo(int, int, ImageOutputStream).writeTo in class ProductDatasourceStartPos - the source start position (zero-based)numSourceElems - the number of elements to be writtendestination - a seekable data output streamIOException - if an I/O error occurspublic void dispose()
This method should be called only if it is for sure that this object instance will never be used again.
The results of referencing an instance of this class after a call to dispose() are undefined.
Overrides of this method should always call super.dispose(); after disposing this instance.
dispose in class ProductDataCopyright © 2002–2014 Brockmann Consult GmbH. All rights reserved.