|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opengts.util.Temperature
public class Temperature
Temperature container
Nested Class Summary | |
---|---|
static class |
Temperature.TemperatureUnits
Enum: Temperature Units |
Field Summary | |
---|---|
static double |
INVALID_TEMPERATURE
|
static long |
MINIMUM_TIMESTAMP
|
static double |
TEMPERATURE_LIMIT_HI
|
static double |
TEMPERATURE_LIMIT_LO
|
Constructor Summary | |
---|---|
Temperature(long ts,
double C)
Temperature constructor |
Method Summary | |
---|---|
static double |
C2F(double C)
Celsius to Fahrenheit |
static double |
F2C(double F)
Fahrenheit to Celsius |
double |
getTemperature(boolean F)
Gets the temperature |
double |
getTemperatureC()
Gets the temperature in Celsius units |
double |
getTemperatureF()
Gets the temperature in Fahrenheit units |
long |
getTimestamp()
Gets the timestamp (in seconds) |
long |
getTimestampMillis()
Gets the timestamp (in milliseconds) |
boolean |
isValid()
Returns true if the timestamp and temperature are valid |
static boolean |
isValid(Temperature T)
Returns true if the specified Celsius temperature is within a valid range |
boolean |
isValidTemperature()
Returns true if the temperature is valid |
static boolean |
isValidTemperature(double C)
Returns true if the specified Celsius temperature is within a valid range |
static boolean |
isValidTemperature(Temperature T)
Returns true if the specified Celsius temperature is within a valid range |
boolean |
isValidTimestamp()
Returns true if the timestamp is valid |
java.lang.String |
toString()
Gets the String representation of this instance |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final long MINIMUM_TIMESTAMP
public static final double INVALID_TEMPERATURE
public static final double TEMPERATURE_LIMIT_LO
public static final double TEMPERATURE_LIMIT_HI
Constructor Detail |
---|
public Temperature(long ts, double C)
ts
- The timestamp (in seconds)C
- The temperature (in Celsius)Method Detail |
---|
public static boolean isValidTemperature(double C)
public static boolean isValidTemperature(Temperature T)
public static boolean isValid(Temperature T)
public static double F2C(double F)
F
- Fahrenheit temperature
public static double C2F(double C)
C
- Celsius temperature
public double getTemperatureC()
public double getTemperatureF()
public double getTemperature(boolean F)
F
- true for Fahrenheit, false for Celsius
public boolean isValidTemperature()
public long getTimestamp()
public long getTimestampMillis()
public boolean isValidTimestamp()
public boolean isValid()
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |