public class HecDoubleParam
extends java.lang.Object
implements java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
static int |
AREA_LARGE |
static int |
AREA_SMALL |
static java.lang.String[] |
FACTORS |
static int |
FLOW_LARGE |
static int |
FLOW_SMALL |
static int |
INVALID_PARAMETER |
static int |
LENGTH_LONG |
static int |
LENGTH_MEDIUM |
static int |
LENGTH_SHORT |
static int |
NON_DIMENSIONAL |
static java.lang.String[] |
UNIT_SYSTEMS
Constants for unit systems.
|
static int |
UNITS_ENGLISH
English unit system constant index.
|
static int |
UNITS_SI
SI unit system constant index.
|
static int |
VOLUME_LARGE |
static int |
VOLUME_PER_AREA |
static int |
VOLUME_SMALL |
| Constructor and Description |
|---|
HecDoubleParam(java.lang.String paramName)
This constuctor uses the default values
|
HecDoubleParam(java.lang.String paramName,
double v,
java.lang.String unitSystem,
int unit) |
HecDoubleParam(java.lang.String paramName,
HecDouble v,
java.lang.String unitSystem,
int unit) |
| Modifier and Type | Method and Description |
|---|---|
double |
getMax()
getMax() returns the maxminum value of the parameter
|
double |
getMin()
getMin() returns the minimum value of the parameter
|
java.lang.String |
getParamName()
getParamName() returns the name of the parameter.
|
double |
getRecMax()
getRecMax() returns the recommended maximum value of the parameter
|
double |
getRecMin()
getRecMin() returns the recommended minimum value of the parameter
|
int |
getUnit() |
java.lang.String |
getUnitSystem() |
double |
getValue() |
HecDouble |
getValue(int unitsys) |
HecDouble |
getValue(java.lang.String s)
get the value in a specific unit system without changing the internal unit representation.
|
int |
isInRange()
isInRange() returns an integer
|
static double |
scaleUnits(double argVal,
int inUnitsize,
int unitsys,
int outUnitsize) |
void |
setUnit(int pu)
set the parameter unit
|
void |
setUnitSystem(java.lang.String us) |
void |
setValue(double v) |
void |
setValue(double v,
java.lang.String unitSystem,
int unit) |
void |
setValue(HecDouble v)
set the parameter and value
|
void |
setValue(HecDouble v,
java.lang.String unitSystem) |
void |
setValue(HecDouble v,
java.lang.String unitSystem,
int unit)
set the parameter, value, and type
|
void |
setValue(java.lang.String s,
double v,
java.lang.String unitSystem,
int unit) |
java.lang.String |
toString() |
static double |
translateUnits(double argVal,
int unitsize,
int inUnitsys,
int outUnitsys) |
public static final java.lang.String[] UNIT_SYSTEMS
public static final int UNITS_ENGLISH
public static final int UNITS_SI
public static final java.lang.String[] FACTORS
public static final int INVALID_PARAMETER
public static final int NON_DIMENSIONAL
public static final int LENGTH_SHORT
public static final int LENGTH_MEDIUM
public static final int LENGTH_LONG
public static final int AREA_SMALL
public static final int AREA_LARGE
public static final int VOLUME_SMALL
public static final int VOLUME_LARGE
public static final int VOLUME_PER_AREA
public static final int FLOW_SMALL
public static final int FLOW_LARGE
public HecDoubleParam(java.lang.String paramName)
public HecDoubleParam(java.lang.String paramName,
HecDouble v,
java.lang.String unitSystem,
int unit)
public HecDoubleParam(java.lang.String paramName,
double v,
java.lang.String unitSystem,
int unit)
public int isInRange()
public double getMin()
public double getMax()
public double getRecMin()
public double getRecMax()
public java.lang.String getParamName()
public void setValue(HecDouble v, java.lang.String unitSystem, int unit)
public void setValue(HecDouble v, java.lang.String unitSystem)
public void setValue(double v,
java.lang.String unitSystem,
int unit)
public void setValue(java.lang.String s,
double v,
java.lang.String unitSystem,
int unit)
public void setValue(HecDouble v)
public void setValue(double v)
public void setUnit(int pu)
_unitpublic void setUnitSystem(java.lang.String us)
public HecDouble getValue(java.lang.String s)
"English" - the returned value will be in English system"SI" - the returned value will be in metric systempublic HecDouble getValue(int unitsys)
public double getValue()
public java.lang.String getUnitSystem()
public int getUnit()
public java.lang.String toString()
toString in class java.lang.Objectpublic static double translateUnits(double argVal,
int unitsize,
int inUnitsys,
int outUnitsys)
public static double scaleUnits(double argVal,
int inUnitsize,
int unitsys,
int outUnitsize)