public abstract class CollectionWrapper<T> extends Object implements Collection<T>
| Constructor and Description |
|---|
CollectionWrapper() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(T e) |
boolean |
addAll(Collection<? extends T> c) |
protected void |
cache(T object)
Called by subclasses to add an object to the cache when executing cacheNext().
|
protected abstract boolean |
cacheNext()
Cache one or more objects from the backend by calling cache(T)
|
void |
clear() |
protected abstract void |
closeBackend()
Close the backend so no more objects can be read from it (getNext()
should only return null afterwards).
|
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> c) |
boolean |
isEmpty() |
Iterator<T> |
iterator() |
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
boolean |
retainAll(Collection<?> c) |
int |
size() |
Object[] |
toArray() |
<A> A[] |
toArray(A[] a) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitequals, hashCodeprotected abstract boolean cacheNext()
protected abstract void closeBackend()
protected void cache(T object)
public boolean add(T e)
add in interface Collection<T>public boolean addAll(Collection<? extends T> c)
addAll in interface Collection<T>public void clear()
clear in interface Collection<T>public boolean contains(Object o)
contains in interface Collection<T>public boolean containsAll(Collection<?> c)
containsAll in interface Collection<T>public boolean isEmpty()
isEmpty in interface Collection<T>public boolean remove(Object o)
remove in interface Collection<T>public boolean removeAll(Collection<?> c)
removeAll in interface Collection<T>public boolean retainAll(Collection<?> c)
retainAll in interface Collection<T>public int size()
size in interface Collection<T>public Object[] toArray()
toArray in interface Collection<T>public <A> A[] toArray(A[] a)
toArray in interface Collection<T>Copyright © 2014. All Rights Reserved.