Modifier and Type | Class and Description |
---|---|
pack-priv static class |
Modifier and Type | Field and Description |
---|---|
private final T | element1
The first element of this set, maybe null. |
private final T | element2
The second element of this set, maybe null. |
Access | Constructor and Description |
---|---|
pack-priv | |
pack-priv | |
private |
Modifier and Type | Method and Description |
---|---|
public Iterator | iterator()
Implements abstract java. Implements java. |
public int | size()
Implements abstract java. Implements java. |
pack-priv Set |
element1 | back to summary |
---|---|
private final T element1 The first element of this set, maybe null. |
element2 | back to summary |
---|---|
private final T element2 The second element of this set, maybe null. If |
SmallSet | back to summary |
---|---|
pack-priv SmallSet() Constructs an empty set. |
SmallSet | back to summary |
---|---|
pack-priv SmallSet(final T element) Constructs a set with exactly one element.
|
SmallSet | back to summary |
---|---|
private SmallSet(final T element1, final T element2) Constructs a new |
iterator | back to summary |
---|---|
public Iterator Implements abstract java. Implements java. Doc from java. Returns an iterator over the elements in this set. The elements are returned in no particular order (unless this set is an instance of some class that provides a guarantee). |
size | back to summary |
---|---|
public int size() Implements abstract java. Implements java. Doc from java. Returns the number of elements in this set (its cardinality). If this
set contains more than
|
union | back to summary |
---|---|
pack-priv Set Returns the union of this set and of the given set. |
Modifier and Type | Field and Description |
---|---|
private T | firstElement
The next element to return in |
private T | secondElement
The element to return in |
Access | Constructor and Description |
---|---|
pack-priv |
Modifier and Type | Method and Description |
---|---|
public boolean | |
public T | |
public void | remove()
Overrides default java. |
firstElement | back to summary |
---|---|
private T firstElement The next element to return in |
secondElement | back to summary |
---|---|
private T secondElement The element to return in |
IteratorImpl | back to summary |
---|---|
pack-priv IteratorImpl(final T firstElement, final T secondElement) |
hasNext | back to summary |
---|---|
public boolean hasNext() Implements java. Doc from java. Returns
|
next | back to summary |
---|---|
public T next() Implements java. Doc from java. Returns the next element in the iteration.
|
remove | back to summary |
---|---|
public void remove() Overrides default java. Doc from java. Removes from the underlying collection the last element returned
by this iterator (optional operation). This method can be called
only once per call to The behavior of an iterator is unspecified if the underlying collection is modified while the iteration is in progress in any way other than by calling this method, unless an overriding class has specified a concurrent modification policy.
The behavior of an iterator is unspecified if this method is called
after a call to the
|