Package hec.io
Class ArrayContainer
java.lang.Object
hec.io.DataContainer
hec.io.ArrayContainer
- All Implemented Interfaces:
Serializable
,Cloneable
A simple container class to hold an array
The array may be int, float or double.
This is indicated by which array is not null. Others have to be null.
Built on top of the DataContainer class
The number of elements in the array is specified by its length
Can be converted to PairedDataContainer for plotting and tabulating.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class hec.io.DataContainer
DataContainer.VERTICAL_DATUM, DataContainer.VERTICAL_UNITS
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
double[]
static final int
float[]
static final int
int[]
Fields inherited from class hec.io.DataContainer
coordinateID, coordinateSystem, CURRENT_VERTICAL_DATUM_HEADER, CURRENT_VERTICAL_DATUM_KEY, dataType, fileLastWriteTimeMillis, fileName, fullName, horizontalDatum, horizontalUnits, lastWriteTimeMillis, location, locationTimezone, modified, otherInfo, storedAsdoubles, subVersion, supplementalInfo, version, VERTICAL_DATUM_INFO_HEADER, VERTICAL_DATUM_INFO_KEY, verticalDatum, verticalUnits, watershed, xOrdinate, yOrdinate, zOrdinate
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
void
clone
(ArrayContainer container) int
double[]
float[]
int[]
boolean
boolean
boolean
void
setDoubleArray
(double[] darray) void
setFloatArray
(float[] farray) void
setIntArray
(int[] iarray) void
setPairedDataContainer
(PairedDataContainer pairedDataContainer) Methods inherited from class hec.io.DataContainer
clone, extractVerticalDatum, getFullName, getHorizontalDatum, getLatLong, getName, getStoreAsDoubles, getSupplementalInfo, getVerticalDatum, getVerticalUnits, insertVerticalDatum, setFullName, setHorizontalDatum, setLatLong, setName, setStoreAsDoubles, setSupplementalInfo, setVerticalDatum, setVerticalDatum, setVerticalUnits, setVerticalUnits, toString
-
Field Details
-
INT_ARRAY
public static final int INT_ARRAY- See Also:
-
FLOAT_ARRAY
public static final int FLOAT_ARRAY- See Also:
-
DOUBLE_ARRAY
public static final int DOUBLE_ARRAY- See Also:
-
intArray
public int[] intArray -
floatArray
public float[] floatArray -
doubleArray
public double[] doubleArray
-
-
Constructor Details
-
ArrayContainer
public ArrayContainer()
-
-
Method Details
-
getArrayType
public int getArrayType() -
isIntArray
public boolean isIntArray() -
isFloatArray
public boolean isFloatArray() -
isDoubleArray
public boolean isDoubleArray() -
clone
-
clone
-
getPairedDataContainer
-
setPairedDataContainer
-
setIntArray
public void setIntArray(int[] iarray) -
setFloatArray
public void setFloatArray(float[] farray) -
setDoubleArray
public void setDoubleArray(double[] darray) -
getIntArray
public int[] getIntArray() -
getFloatArray
public float[] getFloatArray() -
getDoubleArray
public double[] getDoubleArray()
-