Module com.pi4j

Enum Class DigitalState

java.lang.Object
java.lang.Enum<DigitalState>
com.pi4j.io.gpio.digital.DigitalState
All Implemented Interfaces:
Serializable, Comparable<DigitalState>, Constable

public enum DigitalState extends Enum<DigitalState>
Digital State Enumerations
Version:
$Id: $Id
Author:
Robert Savage (http://www.savagehomeautomation.com)
  • Enum Constant Details

  • Method Details

    • values

      public static DigitalState[] 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

      public static DigitalState valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • isHigh

      public boolean isHigh()

      isHigh.

      Returns:
      a boolean.
    • isLow

      public boolean isLow()

      isLow.

      Returns:
      a boolean.
    • value

      public Number value()

      value.

      Returns:
      a Number object.
    • getValue

      public Number getValue()

      Getter for the field value.

      Returns:
      a Number object.
    • getName

      public String getName()

      Getter for the field name.

      Returns:
      a String object.
    • equals

      public boolean equals(DigitalState state)

      equals.

      Parameters:
      state - a DigitalState object.
      Returns:
      a boolean.
    • equals

      public boolean equals(Number state)

      equals.

      Parameters:
      state - a Number object.
      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

      public String toString()
      Overrides:
      toString in class Enum<DigitalState>
    • state

      public static DigitalState state(Number state)

      state.

      Parameters:
      state - a Number object.
      Returns:
      a DigitalState object.
    • getState

      public static DigitalState getState(Number state)

      getState.

      Parameters:
      state - a Number object.
      Returns:
      a DigitalState object.
    • inverseState

      public static DigitalState inverseState(DigitalState state)

      inverseState.

      Parameters:
      state - a DigitalState object.
      Returns:
      a DigitalState object.
    • getInverseState

      public static DigitalState getInverseState(DigitalState state)

      getInverseState.

      Parameters:
      state - a DigitalState object.
      Returns:
      a DigitalState object.
    • getState

      public static DigitalState getState(boolean state)

      getState.

      Parameters:
      state - a boolean.
      Returns:
      a DigitalState object.
    • allStates

      public static DigitalState[] allStates()

      allStates.

      Returns:
      an array of DigitalState objects.
    • all

      public static EnumSet<DigitalState> all()

      all.

      Returns:
      a EnumSet object.
    • parse

      public static DigitalState parse(String state)

      parse.

      Parameters:
      state - a String object.
      Returns:
      a DigitalState object.