public class ClimateUtil extends java.lang.Object implements IClimateHelper
| Constructor and Description |
|---|
ClimateUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addClimateErrorStates(EnumTemperature temperature,
EnumHumidity humidity,
EnumTemperature baseTemp,
EnumTolerance tolTemp,
EnumHumidity baseHumid,
EnumTolerance tolHumid,
java.util.Set<IErrorState> errorStates) |
static int |
getColor(EnumTemperature temperature) |
java.util.ArrayList<EnumHumidity> |
getToleratedHumidity(EnumHumidity prefered,
EnumTolerance tolerance)
Gets a collection of humidities which fit the given parameters.
|
java.util.ArrayList<EnumTemperature> |
getToleratedTemperature(EnumTemperature prefered,
EnumTolerance tolerance)
Gets a collection of temperatures which fit the given parameters.
|
boolean |
isWithinLimits(EnumHumidity humidity,
EnumHumidity baseHumid,
EnumTolerance tolHumid) |
boolean |
isWithinLimits(EnumTemperature temperature,
EnumHumidity humidity,
EnumTemperature baseTemp,
EnumTolerance tolTemp,
EnumHumidity baseHumid,
EnumTolerance tolHumid)
Determines whether the given temperature and humidity are within the given constraints.
|
boolean |
isWithinLimits(EnumTemperature temperature,
EnumTemperature baseTemp,
EnumTolerance tolTemp) |
java.lang.String |
toDisplay(EnumHumidity humidity)
Gets a localized, human readable string for the given humidity.
|
java.lang.String |
toDisplay(EnumTemperature temperature)
Gets a localized, human readable string for the given temperature.
|
public boolean isWithinLimits(EnumTemperature temperature, EnumHumidity humidity, EnumTemperature baseTemp, EnumTolerance tolTemp, EnumHumidity baseHumid, EnumTolerance tolHumid)
IClimateHelperisWithinLimits in interface IClimateHelpertemperature - The temperature to test.humidity - The humidity to test.baseTemp - Base temperature for the test.tolTemp - Temperature tolerance to apply.baseHumid - Base humidity for the test.tolHumid - Humidity tolerance to apply.public boolean isWithinLimits(EnumTemperature temperature, EnumTemperature baseTemp, EnumTolerance tolTemp)
isWithinLimits in interface IClimateHelperpublic boolean isWithinLimits(EnumHumidity humidity, EnumHumidity baseHumid, EnumTolerance tolHumid)
isWithinLimits in interface IClimateHelperpublic java.util.ArrayList<EnumHumidity> getToleratedHumidity(EnumHumidity prefered, EnumTolerance tolerance)
IClimateHelpergetToleratedHumidity in interface IClimateHelperprefered - Base humidity from which to measure.tolerance - Tolerance to apply to the base humidity.public java.util.ArrayList<EnumTemperature> getToleratedTemperature(EnumTemperature prefered, EnumTolerance tolerance)
IClimateHelpergetToleratedTemperature in interface IClimateHelperprefered - Base temperature from which to measure.tolerance - Tolerance to apply to the base temperatures.public java.lang.String toDisplay(EnumTemperature temperature)
IClimateHelpertoDisplay in interface IClimateHelpertemperature - Temperature to generate the string for.public java.lang.String toDisplay(EnumHumidity humidity)
IClimateHelpertoDisplay in interface IClimateHelperhumidity - Humidity to generate the string for.public static void addClimateErrorStates(EnumTemperature temperature, EnumHumidity humidity, EnumTemperature baseTemp, EnumTolerance tolTemp, EnumHumidity baseHumid, EnumTolerance tolHumid, java.util.Set<IErrorState> errorStates)
public static int getColor(EnumTemperature temperature)