Package org.midheaven.lang
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 Summary
Modifier and TypeMethodDescriptionclear(FlagElement<E> element) Performs clear.flip(FlagElement<E> element) Performs flip.booleanisSet(FlagElement<E> candidate) Checks whether is Set.set(FlagElement<E> element) Performs set.
-
Method Details
-
isSet
Checks whether is Set.- Parameters:
candidate- the candidate value- Returns:
- the result of isSet
-
set
Performs set.- Parameters:
element- the element value- Returns:
- the result of set
-
clear
Performs clear.- Parameters:
element- the element value- Returns:
- the result of clear
-
flip
Performs flip.- Parameters:
element- the element value- Returns:
- the result of flip
-