Interface Flag<E extends FlagElement<E>>

Type Parameters:
E - the corresponding FlagElement
All Known Implementing Classes:
IntegerFlag

public interface Flag<E extends FlagElement<E>>
Defines the contract for an object that acts as a flag
  • Method Details

    • isSet

      boolean isSet(FlagElement<E> candidate)
      Checks whether is Set.
      Parameters:
      candidate - the candidate value
      Returns:
      the result of isSet
    • set

      Flag<E> set(FlagElement<E> element)
      Performs set.
      Parameters:
      element - the element value
      Returns:
      the result of set
    • clear

      Flag<E> clear(FlagElement<E> element)
      Performs clear.
      Parameters:
      element - the element value
      Returns:
      the result of clear
    • flip

      Flag<E> flip(FlagElement<E> element)
      Performs flip.
      Parameters:
      element - the element value
      Returns:
      the result of flip