Enum Class ClauseAction

java.lang.Object
java.lang.Enum<ClauseAction>
com.reduxrobotics.sensors.canandcolor.digout.ClauseAction
All Implemented Interfaces:
Serializable, Comparable<ClauseAction>, Constable

public enum ClauseAction extends Enum<ClauseAction>
Enum specifying clause behavior for a digout slot. Digout slots may either join with the next index numbered slot (e.g. slot 0 to slot 1) with a boolean operation to connect them in a clause, or terminate the current chain. All clauses have to evaluate to true for the digital output to be true.
  • Enum Constant Details

    • kTerminate

      public static final ClauseAction kTerminate
      Do not join this slot with the next slot -- rather, terminate the clause here. If no previous slots are joining to this slot, then we have a single-slot "singleton" clause.
    • kOrWithNextSlot

      public static final ClauseAction kOrWithNextSlot
      Logical OR this slot's value with the next slot's value
    • kAndWithNextSlot

      public static final ClauseAction kAndWithNextSlot
      Logical AND this slot's value with the next slot's value
    • kXorWithNextSlot

      public static final ClauseAction kXorWithNextSlot
      Logical XOR this slot's value with the next slot's value
  • Method Details

    • values

      public static ClauseAction[] 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 ClauseAction 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
    • getIndex

      public byte getIndex()
      Fetches the index associated with the enum.
      Returns:
      index value
    • fromIndex

      public static ClauseAction fromIndex(int index)
      Fetches the enum associated with the index value.
      Parameters:
      index - int containing index value; only lower 2 bits are used
      Returns:
      corresponding enum