public class PairedValues 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 |
|---|
PairedValues() |
| Modifier and Type | Method and Description |
|---|---|
void |
addPair(double xval,
double yval) |
boolean |
canInterpX() |
boolean |
canInterpY() |
void |
clearValues()
clears all values from the array
|
java.lang.Object |
clone()
Implementation of the public clone interface
|
int |
findInterval(double xval)
find interval for interpolation
|
int |
findInterval(double[] array,
double val)
find interval for interpolation
|
java.lang.String |
getCurveLabel() |
java.lang.String |
getData() |
java.util.Vector |
getDataVector()
get a clone of the Vector of
ValuePairs |
double |
getDatum() |
void |
getDatum(hec.data.ParamDouble pd) |
java.lang.String |
getDssFileName() |
DSSIdentifier |
getDssIdentifer() |
java.lang.String |
getDssPathName() |
java.lang.Object |
getFieldObject(java.lang.reflect.Field fld)
This method allows access to java.lang.reflect.Field objects within the implementing
class.
|
int |
getInterpolationType()
Returns the current interpolation type that is set.
|
ValuePair |
getLastValuePair() |
double |
getMaxY() |
double |
getMinY() |
double |
getOffset() |
int |
getPairCount() |
PairedDataContainer |
getPairedDataContainer() |
int[] |
getParametersIds()
Returns an array the parameter ID's in the order of {XPARAMID, YPARAMID}.
|
int |
getParamXId() |
java.lang.String |
getParamXString() |
java.lang.String |
getParamXUnitsString() |
int |
getParamYId() |
java.lang.String |
getParamYString() |
java.lang.String |
getParamYUnitsString() |
double |
getShift() |
int |
getUnitSystem() |
ValuePair |
getValuePair(int i) |
double[] |
getXArray() |
double |
getXValue(double yval)
get a single x value - given yvalue
|
double |
getXValue(int i)
get a single x value
|
void |
getXValue(int i,
hec.data.ParamDouble pd)
Gets an x value at location i.
|
double[] |
getYArray() |
double |
getYValue(double xval)
get a single y value - given xvalue
|
double |
getYValue(int i)
get a single y value
|
void |
getYValue(int i,
hec.data.ParamDouble pd)
Gets an y value at location i.
|
boolean |
hasCurveLabel() |
java.util.List |
init() |
double |
interpolate(double xval)
interpolate a value at the given time based on the default interpolation method
|
double |
interpolateStepValue(double xval) |
double |
interpolateValue(double xval)
linear interpolation, return y for given x value
|
double |
interpolateValueCubicSpline(double xval) |
double |
interpolateY(double yval)
interpolate a value at the given time based on the default interpolation method
|
boolean |
isXValueOutOfRange(double xval) |
boolean |
isYValueOutOfRange(double yval) |
int |
parseString(java.lang.String param) |
void |
removePair(int i)
Removes a value pair at the given index
|
void |
setCurveLabel(java.lang.String curveLabel)
curveLabel for y-ordinate
|
boolean |
setData(PairedDataContainer pdc)
Transfer data from the PairedDataContainer into the PairedValuesExt
|
int |
setData(java.lang.String values) |
void |
setDatum(double datum) |
void |
setDatum(hec.data.ParamDouble pd) |
void |
setDssIdentifer(DSSIdentifier dssId) |
void |
setDssPathName(java.lang.String pathName) |
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 |
setInterpolationType(int type)
Sets the interpolation type used when doing linear interpolations.
|
void |
setOffset(double offset) |
void |
setParamXId(int paramId) |
void |
setParamYId(int paramId) |
void |
setShift(double shift) |
void |
setUnitSystem(int us) |
int |
size()
Returns the number of value paires contained in this object.
|
java.lang.String |
toString() |
java.lang.String |
toTableForm(int precision) |
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 double getMinY()
public double getMaxY()
public int getUnitSystem()
public java.lang.String getDssPathName()
public java.lang.String getDssFileName()
public void setDssPathName(java.lang.String pathName)
public DSSIdentifier getDssIdentifer()
public void setDssIdentifer(DSSIdentifier dssId)
public java.lang.String getParamXUnitsString()
public java.lang.String getParamYUnitsString()
public java.lang.String getParamXString()
public java.lang.String getParamYString()
public int[] getParametersIds()
public void setUnitSystem(int us)
public void setParamXId(int paramId)
public void setParamYId(int paramId)
public int getParamXId()
public int getParamYId()
public void getXValue(int i,
hec.data.ParamDouble pd)
public void getYValue(int i,
hec.data.ParamDouble pd)
public double getXValue(int i)
public double getYValue(int i)
public double getXValue(double yval)
public double getYValue(double xval)
public double interpolate(double xval)
public double interpolateY(double yval)
public double interpolateValue(double xval)
public double interpolateStepValue(double xval)
public double interpolateValueCubicSpline(double xval)
public boolean isXValueOutOfRange(double xval)
public boolean isYValueOutOfRange(double yval)
public int findInterval(double xval)
public int findInterval(double[] array,
double val)
public int parseString(java.lang.String param)
public void setInterpolationType(int type)
public int getInterpolationType()
public int size()
public void clearValues()
public int getPairCount()
public ValuePair getValuePair(int i)
public ValuePair getLastValuePair()
public void removePair(int i)
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toTableForm(int precision)
public void addPair(double xval,
double yval)
public java.util.Vector getDataVector()
ValuePairsValuePairspublic java.lang.Object clone()
clone in class java.lang.Objectpublic java.util.List init()
public double[] getXArray()
public double[] getYArray()
public boolean canInterpX()
public boolean canInterpY()
public boolean setData(PairedDataContainer pdc)
pdc - public void setCurveLabel(java.lang.String curveLabel)
public java.lang.String getCurveLabel()
public boolean hasCurveLabel()
public void setDatum(double datum)
public double getDatum()
public void getDatum(hec.data.ParamDouble pd)
public void setDatum(hec.data.ParamDouble pd)
public void setShift(double shift)
public double getShift()
public void setOffset(double offset)
public double getOffset()
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 fieldpublic java.lang.String getData()
public int setData(java.lang.String values)
public PairedDataContainer getPairedDataContainer()