- All Implemented Interfaces:
Serializable,Comparable<DigitalState>,Constable
Digital State Enumerations
- Version:
- $Id: $Id
- Author:
- Robert Savage (http://www.savagehomeautomation.com)
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic EnumSet<DigitalState>all()all.static DigitalState[]allStates.booleanequals(boolean state) equals.booleanequals(byte state) equals.booleanequals(double state) equals.booleanequals(float state) equals.booleanequals(int state) equals.booleanequals(long state) equals.booleanequals(short state) equals.booleanequals(DigitalState state) equals.booleanequals.static DigitalStategetInverseState(DigitalState state) getInverseState.getName()Getter for the fieldname.static DigitalStategetState(boolean state) getState.static DigitalStategetState.getValue()Getter for the fieldvalue.static DigitalStateinverseState(DigitalState state) inverseState.booleanisHigh()isHigh.booleanisLow()isLow.static DigitalStateparse.static DigitalStatestate.toString()value()value.static DigitalStateReturns the enum constant of this class with the specified name.static DigitalState[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
UNKNOWN
-
LOW
-
HIGH
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
isHigh
public boolean isHigh()isHigh.
- Returns:
- a boolean.
-
isLow
public boolean isLow()isLow.
- Returns:
- a boolean.
-
value
value.
- Returns:
- a
Numberobject.
-
getValue
Getter for the field
value.- Returns:
- a
Numberobject.
-
getName
Getter for the field
name.- Returns:
- a
Stringobject.
-
equals
equals.
- Parameters:
state- aDigitalStateobject.- Returns:
- a boolean.
-
equals
equals.
- Parameters:
state- aNumberobject.- Returns:
- a boolean.
-
equals
public boolean equals(boolean state) equals.
- Parameters:
state- a boolean.- Returns:
- a boolean.
-
equals
public boolean equals(byte state) equals.
- Parameters:
state- a byte.- Returns:
- a boolean.
-
equals
public boolean equals(short state) equals.
- Parameters:
state- a short.- Returns:
- a boolean.
-
equals
public boolean equals(int state) equals.
- Parameters:
state- a int.- Returns:
- a boolean.
-
equals
public boolean equals(long state) equals.
- Parameters:
state- a long.- Returns:
- a boolean.
-
equals
public boolean equals(float state) equals.
- Parameters:
state- a float.- Returns:
- a boolean.
-
equals
public boolean equals(double state) equals.
- Parameters:
state- a double.- Returns:
- a boolean.
-
toString
- Overrides:
toStringin classEnum<DigitalState>
-
state
state.
- Parameters:
state- aNumberobject.- Returns:
- a
DigitalStateobject.
-
getState
getState.
- Parameters:
state- aNumberobject.- Returns:
- a
DigitalStateobject.
-
inverseState
inverseState.
- Parameters:
state- aDigitalStateobject.- Returns:
- a
DigitalStateobject.
-
getInverseState
getInverseState.
- Parameters:
state- aDigitalStateobject.- Returns:
- a
DigitalStateobject.
-
getState
getState.
- Parameters:
state- a boolean.- Returns:
- a
DigitalStateobject.
-
allStates
allStates.
- Returns:
- an array of
DigitalStateobjects.
-
all
all.
- Returns:
- a
EnumSetobject.
-
parse
parse.
- Parameters:
state- aStringobject.- Returns:
- a
DigitalStateobject.
-