Package hec.model

Class ValueSet

java.lang.Object
hec.model.ValueSet
All Implemented Interfaces:
Serializable, Cloneable

public class ValueSet extends Object implements Serializable, Cloneable
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    double
     
    double[]
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    ValueSet(double x, double y)
     
    ValueSet(double x, double[] y)
     
    ValueSet(int numy)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    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.

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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

      public Object clone() throws CloneNotSupportedException
      Overrides:
      clone in class Object
      Throws:
      CloneNotSupportedException