java.util
static class: Collections.SingletonSet [javadoc |
source]
java.lang.Object
java.util.AbstractCollection
java.util.AbstractSet
java.util.Collections$SingletonSet
All Implemented Interfaces:
Serializable, Set, Collection
| Methods from java.util.AbstractCollection: |
|---|
|
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray, toString |
| Methods from java.lang.Object: |
|---|
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method from java.util.Collections$SingletonSet Detail: |
public boolean contains(Object o) {
return eq(o, element);
}
|
public Iterator iterator() {
return singletonIterator(element);
}
|
public int size() {
return 1;
}
|