public interface Set<E>
Modifier and Type | Method and Description |
---|---|
boolean |
contains(E e)
Reports whether a given element belongs to this set.
|
void |
include(E e)
Adds an input element to this set, throwing an
ElementFoundException if this element already belongs
to it.
|
void |
remove(E e)
Removes an input element to this set, throwing a
NoSuchElementException if this element does not belong to it.
|
boolean contains(E e)
e
- the element to be searched forvoid include(E e) throws ElementFoundException
e
- the element to be added to this setElementFoundException
- if this element is already in the set
void remove(E e) throws java.util.NoSuchElementException
e
- the element to be removed from this setjava.util.NoSuchElementException
- if this element was not in this set