E - any Object typepublic class NonStoringCollection<E> extends java.lang.Object implements java.util.Collection<E>
| Constructor and Description |
|---|
NonStoringCollection() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(java.lang.Object e)
Always returns
false. |
boolean |
addAll(java.util.Collection<? extends E> c)
Always returns
false. |
void |
clear() |
boolean |
contains(java.lang.Object o)
Since no objects are stored in this collection this method will always return
false. |
boolean |
containsAll(java.util.Collection<?> c)
Since no objects are stored in this collection this method will always return
false. |
boolean |
isEmpty()
Since no objects are stored in this collection this method will always return
true. |
java.util.Iterator<E> |
iterator()
Since no objects are stored in this collection this method will always return an empty iterator.
|
boolean |
remove(java.lang.Object o)
Since no objects are stored in this collection, no objects can be removed.
|
boolean |
removeAll(java.util.Collection<?> c)
Since no objects are stored in this collection, no objects can be removed.
|
boolean |
retainAll(java.util.Collection<?> c)
Since no objects are stored in this collection, no objects can be removed.
|
int |
size()
Since no objects are stored in this collection its size will always be 0.
|
java.lang.Object[] |
toArray() |
java.lang.Object[] |
toArray(java.lang.Object[] a) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic NonStoringCollection()
public boolean add(java.lang.Object e)
false. The object will not be stored.add in interface java.util.Collection<E>falsepublic boolean addAll(java.util.Collection<? extends E> c)
false. The object in the collection will not be stored.addAll in interface java.util.Collection<E>falsepublic boolean contains(java.lang.Object o)
false.contains in interface java.util.Collection<E>falsepublic boolean containsAll(java.util.Collection<?> c)
false.containsAll in interface java.util.Collection<E>falsepublic boolean isEmpty()
true.isEmpty in interface java.util.Collection<E>truepublic java.util.Iterator<E> iterator()
public boolean remove(java.lang.Object o)
false.remove in interface java.util.Collection<E>falsepublic boolean removeAll(java.util.Collection<?> c)
false.removeAll in interface java.util.Collection<E>falsepublic boolean retainAll(java.util.Collection<?> c)
false.retainAll in interface java.util.Collection<E>falsepublic int size()
size in interface java.util.Collection<E>public java.lang.Object[] toArray()
toArray in interface java.util.Collection<E>