@Immutable public final class AbsentClimateState extends java.lang.Object implements IClimateState
| Modifier and Type | Field and Description |
|---|---|
static AbsentClimateState |
INSTANCE |
| Constructor and Description |
|---|
AbsentClimateState() |
| Modifier and Type | Method and Description |
|---|---|
IClimateState |
add(IClimateState state)
Adds the given state to this state.
|
IClimateState |
addHumidity(float humidity)
Adds the given value to the humidity value of this state.
|
IClimateState |
addTemperature(float temperature)
Adds the given value to the temperature value of this state.
|
IClimateState |
copy() |
IClimateState |
copy(boolean mutable) |
boolean |
equals(java.lang.Object obj) |
float |
getHumidity() |
float |
getTemperature() |
int |
hashCode() |
boolean |
isClamped() |
boolean |
isMutable() |
boolean |
isPresent() |
IClimateState |
map(java.util.function.Function<java.lang.Float,java.lang.Float> mapper)
Applies the mapper
Function.apply(Object) on the two climate values of this state. |
IClimateState |
multiply(double factor)
Multiplies the values of this state with the given factor.
|
IClimateState |
setClimate(float temperature,
float humidity)
Sets the humidity and temperature value to the given values.
|
IClimateState |
setHumidity(float humidity)
Sets the humidity value of this state.
|
IClimateState |
setTemperature(float temperature)
Sets the temperature value of this state.
|
IClimateState |
subtract(IClimateState state)
Subtracts the given state from this state.
|
IClimateState |
toImmutable() |
IClimateState |
toMutable() |
java.lang.String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitadd, getClimate, getHumidityEnum, getTemperatureEnum, setClimate, subtract, subtractHumidity, subtractTemperaturepublic static final AbsentClimateState INSTANCE
public IClimateState copy()
copy in interface IClimateStateIClimateState.isMutable() of this state is true or returns the immutable state.public IClimateState setTemperature(float temperature)
IClimateStatesetTemperature in interface IClimateStateIClimateState.isMutable() this state or if it isn't a immutable copy of the state with the new values.public IClimateState setHumidity(float humidity)
IClimateStatesetHumidity in interface IClimateStateIClimateState.isMutable() this state or if it isn't a immutable copy of the state with the new values.public IClimateState setClimate(float temperature, float humidity)
IClimateStatesetClimate in interface IClimateStateIClimateState.isMutable() this state or if it isn't a immutable copy of the state with the new values.public IClimateState addTemperature(float temperature)
IClimateStateaddTemperature in interface IClimateStateIClimateState.isMutable() this state or if it isn't a immutable copy of the state with the new values.public IClimateState addHumidity(float humidity)
IClimateStateaddHumidity in interface IClimateStateIClimateState.isMutable() this state or if it isn't a immutable copy of the state with the new values.public IClimateState add(IClimateState state)
IClimateStateadd in interface IClimateStateIClimateState.isMutable() this state or if it isn't a immutable copy of the state with the new values.public IClimateState multiply(double factor)
IClimateStatemultiply in interface IClimateStateIClimateState.isMutable() this state or if it isn't a immutable copy of the state with the new values.public IClimateState subtract(IClimateState state)
IClimateStatesubtract in interface IClimateStateIClimateState.isMutable() this state or if it isn't a immutable copy of the state with the new values.public IClimateState map(java.util.function.Function<java.lang.Float,java.lang.Float> mapper)
IClimateStateFunction.apply(Object) on the two climate values of this state.map in interface IClimateStateIClimateState.isMutable() this state or if it isn't a immutable copy of the state with the new values.public boolean isPresent()
isPresent in interface IClimateStatepublic boolean isClamped()
isClamped in interface IClimateStateIClimateStateHelper.clamp(IClimateState)public boolean isMutable()
isMutable in interface IClimateStatepublic IClimateState toImmutable()
toImmutable in interface IClimateStatepublic IClimateState copy(boolean mutable)
copy in interface IClimateStatemutable - If the copy of this state should be mutable or immutable.public IClimateState toMutable()
toMutable in interface IClimateStatepublic float getTemperature()
getTemperature in interface IClimateStatepublic float getHumidity()
getHumidity in interface IClimateStatepublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object