pivot.collections
Interface Group<E>

All Known Subinterfaces:
Set<E>
All Known Implementing Classes:
EnumSet, HashSet, ImmutableSet, SetAdapter, SynchronizedSet, TaskGroup

public interface Group<E>

Interface representing a group of unique elements.

Author:
gbrown

Method Summary
 void add(E element)
          Adds an element to the group.
 boolean contains(E element)
          Tests the existence of an element in the group.
 boolean isEmpty()
          Tests the emptiness of the group.
 void remove(E element)
          Removes an element from the group.
 

Method Detail

add

void add(E element)
Adds an element to the group.

Parameters:
element - The element to add to the group.

remove

void remove(E element)
Removes an element from the group.

Parameters:
element - The element to remove from the set.

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.

isEmpty

boolean isEmpty()
Tests the emptiness of the group.

Returns:
true if the group contains no elements; false, otherwise.