public class SeasonalRecord extends java.lang.Object implements AsciiSerializable, java.lang.Cloneable
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
INTERP_CUBIC |
static int |
INTERP_CUBIC_ID |
static java.lang.String |
INTERP_LINEAR |
static int |
INTERP_LINEAR_ID |
static java.lang.String |
INTERP_STEP |
static int |
INTERP_STEP_ID |
static java.lang.String[] |
INTERP_STRINGS |
| Constructor and Description |
|---|
SeasonalRecord() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
empty record of all data
|
java.lang.Object |
clone()
Creates a new object of the same class as this object.
|
int |
findInterval(int rundate)
find interval time for interpolation
|
double |
getAnnualAverage() |
java.lang.String |
getCurvelLabel()
set the label for the SeasonalRecord curve
|
double |
getCurveValue()
Parse the curve label string to return a double value.
|
double[] |
getDataArray() |
DSSIdentifier |
getDSSIdentifier() |
java.lang.Object |
getFieldObject(java.lang.reflect.Field fld)
This method allows access to java.lang.reflect.Field objects within the implementing
class.
|
int |
getGmtOffset()
Returns the time zone that this data is defined for.
|
int |
getInterpolationType() |
double |
getLargestValue()
gets the largest value greater than zero from the data array
|
int |
getParameterId()
Returns the parameter id for the "double" data values.
|
java.lang.String |
getParamIdString() |
int |
getTime(int id)
returns the time at the specified array location
|
int[] |
getTimeArray() |
java.lang.String |
getUnitsString() |
int |
getUnitSystem()
Returns the unit system that this data is defined in or hec.data.Units.UNDEF_ID if no unit system has been set
|
double |
getValue(int id)
returns the value at the specified array location
|
int |
getYears()
get the length of the seasonal record (years)
|
void |
init() |
double |
interpolate(HecTime htime) |
double |
interpolate(RunTimeStep runtime)
interpolate a value at the given time based on the default interpolation method
|
double |
interpolateStepValue(int interpTime) |
double |
interpolateValue(int interpTime)
Do a linear interpolation of value based on time
|
double |
interpolateValueCubicSpline(int interpTime) |
int |
parseString(java.lang.String param) |
void |
scaleValues(double scl) |
void |
setArrays(int[] timeArray,
double[] dataArray) |
void |
setCurveLabel(java.lang.String str)
set the label for the SeasonalRecord curve
|
void |
setDSSIdentifier(DSSIdentifier dssId) |
boolean |
setFieldObject(java.lang.reflect.Field fld,
java.lang.Object fobj)
This allows access to fields withing the implementing object to set there data.
|
void |
setGmtOffset(int offset) |
void |
setInterpolationType(int type) |
void |
setParameterId(int parameterId)
Sets the parameter ID for the double values in this record.
|
void |
setUnitSystem(int us)
Sets the new unit system for this data.
|
int |
size()
returns the current length of the seasonal record data arrays
|
java.lang.String |
toString() |
public static final java.lang.String INTERP_LINEAR
public static final java.lang.String INTERP_CUBIC
public static final java.lang.String INTERP_STEP
public static final int INTERP_LINEAR_ID
public static final int INTERP_CUBIC_ID
public static final int INTERP_STEP_ID
public static final java.lang.String[] INTERP_STRINGS
public void scaleValues(double scl)
public void setParameterId(int parameterId)
public int getParameterId()
public void setUnitSystem(int us)
public void setGmtOffset(int offset)
public int getUnitSystem()
public java.lang.String getUnitsString()
public java.lang.String getParamIdString()
public int getGmtOffset()
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedExceptionpublic void init()
public void setInterpolationType(int type)
public int getInterpolationType()
public int[] getTimeArray()
public double[] getDataArray()
public void setArrays(int[] timeArray,
double[] dataArray)
public void clear()
public double interpolate(RunTimeStep runtime)
public double interpolate(HecTime htime)
public double interpolateValue(int interpTime)
public double interpolateStepValue(int interpTime)
public double interpolateValueCubicSpline(int interpTime)
public int findInterval(int rundate)
public void setCurveLabel(java.lang.String str)
public java.lang.String getCurvelLabel()
public double getCurveValue()
public java.lang.String toString()
toString in class java.lang.Objectpublic int parseString(java.lang.String param)
public int size()
public double getLargestValue()
public double getAnnualAverage()
public double getValue(int id)
public int getTime(int id)
public int getYears()
public void setDSSIdentifier(DSSIdentifier dssId)
public DSSIdentifier getDSSIdentifier()
public java.lang.Object getFieldObject(java.lang.reflect.Field fld)
FieldAccessorgetFieldObject in interface FieldAccessorfld - The field to get.public boolean setFieldObject(java.lang.reflect.Field fld,
java.lang.Object fobj)
FieldAccessorsetFieldObject in interface FieldAccessorfld - The java field object representing the member field to be setfobj - The data to set in that field