Package org.apache.pivot.collections
Interface Group<E>
-
- Type Parameters:
E- Type of element stored in the group.
- All Known Subinterfaces:
Set<E>
- All Known Implementing Classes:
ButtonGroup,EnumSet,HashSet,ImmutableSet,RadioButtonGroup,SetAdapter,SynchronizedSet,TaskGroup
public interface Group<E>Interface representing a group of unique elements.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanadd(E element)Adds an element to the group.booleancontains(E element)Tests the existence of an element in the group.booleanremove(E element)Removes an element from the group.
-
-
-
Method Detail
-
add
boolean add(E element)
Adds an element to the group.- Parameters:
element- The element to add to the group.- Returns:
trueif the element was added to the group;false, otherwise.
-
remove
boolean remove(E element)
Removes an element from the group.- Parameters:
element- The element to remove from the set.- Returns:
trueif the element was removed from the group;false, otherwise.
-
contains
boolean contains(E element)
Tests the existence of an element in the group.- Parameters:
element- The element whose presence in the group is to be tested.- Returns:
trueif the element exists in the group;false, otherwise.
-
-