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 boolean
add(E element)
Adds an element to the group.boolean
contains(E element)
Tests the existence of an element in the group.boolean
remove(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:
true
if 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:
true
if 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:
true
if the element exists in the group;false
, otherwise.
-
-