Package hec.model
Class ValueSet
java.lang.Object
hec.model.ValueSet
- All Implemented Interfaces:
Serializable
,Cloneable
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
void
ensureCapacity
(int minCapacity) Makes sure that the the internal storage arrays can accomodate and given number of elements.void
insertValue
(int index) Inserts a blank value (RMACosnt.UNDEF_DOUBLE) into the y array values.void
insertValue
(int index, double value) Inserts a blank value (RMACosnt.UNDEF_DOUBLE) into the y array values.void
removeValue
(int index) Removes a value from the y-value array.
-
Field Details
-
xval
public double xval -
yval
public double[] yval
-
-
Constructor Details
-
ValueSet
public ValueSet() -
ValueSet
public ValueSet(double x, double y) -
ValueSet
public ValueSet(double x, double[] y) -
ValueSet
public ValueSet(int numy)
-
-
Method Details
-
insertValue
public void insertValue(int index) Inserts a blank value (RMACosnt.UNDEF_DOUBLE) into the y array values. It breaks the array at the specified index and creates a new array of one size bigger. If the index value is less than zero or greater than the size of the array, it is ignored If the index is arraysize, the new value is appended to the end of the list.- Parameters:
index
- the index into the array to insert a UNDEF_VALUE;
-
insertValue
public void insertValue(int index, double value) Inserts a blank value (RMACosnt.UNDEF_DOUBLE) into the y array values. It breaks the array at the specified index and creates a new array of one size bigger. If the index value is less than zero or greater than the size of the array, it is ignored If the index is arraysize, the new value is appended to the end of the list.- Parameters:
index
- the index into the array to insert a UNDEF_VALUE;value
- the value to insert at the index position.
-
removeValue
public void removeValue(int index) Removes a value from the y-value array. The array is reduced in size by 1. -
ensureCapacity
public void ensureCapacity(int minCapacity) Makes sure that the the internal storage arrays can accomodate and given number of elements. If not then the arrays are adjusted to fit -
clone
- Overrides:
clone
in classObject
- Throws:
CloneNotSupportedException
-