|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.isti.util.MeasurementUnits
Class MeasurementUnits contains various methods and // constants for measurement units.
Field Summary | |
static java.lang.String |
DEFAULT_DISPLAY_NAME
The display name for the default measurement units. |
static java.lang.String |
METRIC_DISPLAY_NAME
The display name for the metric measurement units. |
static java.lang.String |
US_DISPLAY_NAME
The display name for the U.S. |
Fields inherited from interface com.isti.util.MeasurementUnitsInformation |
DEFAULT_MEASUREMENT_UNITS, FEET, FEET_TO_METER, KILOM, KM_TO_MILE, METER, METER_TO_FEET, METER_TO_KM, METER_TO_MILE, MILE_TO_KM, MILE_TO_METER, MILES |
Constructor Summary | |
MeasurementUnits()
|
Method Summary | |
static CfgPropValidator |
getCfgPropValidator()
Gets the configuration property validator. |
static int |
getIntegerValue(double d,
int mu)
Converts the value to the current units. |
int |
getMeasurementUnits()
Gets the measurement units. |
static int |
getMeasurementUnits(int mu)
Gets the measurement units or the measurement units for the default locale. |
static int |
getMeasurementUnits(int mu,
java.util.Locale localeObj)
Gets the measurement units. |
static java.lang.String |
getMeasurementUnitsString(boolean pluralFlag,
int mu)
Gets the measurement units string for the specified specified units. |
static java.lang.String |
getMeasurementUnitsString(double d,
int mu)
Gets the measurement units string for the specified specified units. |
static java.lang.String |
getMeasurementUnitsString(int dVal,
int mu)
Gets the measurement units string for the specified specified units. |
double |
getValue(double d)
Converts the value to the current units. |
static double |
getValue(double d,
int mu)
Converts the value to the specified units. |
java.lang.String |
getValueString(double d)
Gets the value string in the current units. |
static java.lang.String |
getValueString(double d,
int mu)
Gets the value string in the specified units. |
static java.lang.String |
getValueString(int dVal,
int mu)
Gets the value string in the specified units. |
boolean |
isMetric()
Determines if the current units is metric. |
static boolean |
isMetric(int mu)
Determines if the specified units is metric. |
static int |
parseMeasurementUnits(java.lang.String dataStr)
Parses the data string for measurement units. |
void |
setMeasurementUnits(int mu)
Sets the measurement units. |
void |
setMeasurementUnits(java.lang.String dataStr)
Sets the measurement units. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static java.lang.String DEFAULT_DISPLAY_NAME
public static java.lang.String METRIC_DISPLAY_NAME
public static java.lang.String US_DISPLAY_NAME
Constructor Detail |
public MeasurementUnits()
Method Detail |
public static int getIntegerValue(double d, int mu)
d
- the value in meters.mu
- the measurement units.
public int getMeasurementUnits()
getMeasurementUnits
in interface MeasurementUnitsInformation
public static int getMeasurementUnits(int mu)
mu
- the measurement units.
public static int getMeasurementUnits(int mu, java.util.Locale localeObj)
mu
- the measurement units.localeObj
- the locale object.
public static java.lang.String getMeasurementUnitsString(boolean pluralFlag, int mu)
pluralFlag
- true to use the plural text.mu
- the measurement units.
public static java.lang.String getMeasurementUnitsString(double d, int mu)
d
- the value in meters.mu
- the measurement units.
public static java.lang.String getMeasurementUnitsString(int dVal, int mu)
dVal
- the value in meters.mu
- the measurement units.
public static CfgPropValidator getCfgPropValidator()
public double getValue(double d)
d
- the value in meters.
public static double getValue(double d, int mu)
d
- the value in meters.mu
- the measurement units.
public static int parseMeasurementUnits(java.lang.String dataStr)
dataStr
- the measurement units data string.
public java.lang.String getValueString(double d)
d
- the value in meters.
public static java.lang.String getValueString(double d, int mu)
d
- the value in meters.mu
- the measurement units.
public static java.lang.String getValueString(int dVal, int mu)
dVal
- the value in meters.mu
- the measurement units.
public boolean isMetric()
public static boolean isMetric(int mu)
mu
- the measurement units.
public void setMeasurementUnits(int mu)
setMeasurementUnits
in interface MeasurementUnitsInformation
mu
- the measurement units.public void setMeasurementUnits(java.lang.String dataStr)
dataStr
- the measurement units data string.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |