Package org.zkoss.zkmax.bind.ext
Class ForwardingCollection<E>
java.lang.Object
org.zkoss.zkmax.bind.ext.ForwardingCollection<E>
- All Implemented Interfaces:
Iterable<E>,Collection<E>
A collection which forwards all its method calls to another collection.
Subclasses should override one or more methods to modify the behavior of
the backing collection as desired per the decorator pattern.
- Author:
- Kevin Bourrillion
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanaddAll(Collection<? extends E> collection) voidclear()booleanbooleancontainsAll(Collection<?> collection) protected abstract Collection<E>delegate()booleanisEmpty()iterator()booleanbooleanremoveAll(Collection<?> collection) booleanretainAll(Collection<?> collection) intsize()Object[]toArray()<T> T[]toArray(T[] array) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Collection
equals, hashCode, parallelStream, removeIf, spliterator, stream, toArray
-
Constructor Details
-
ForwardingCollection
public ForwardingCollection()
-
-
Method Details
-
delegate
-
iterator
-
size
public int size()- Specified by:
sizein interfaceCollection<E>
-
removeAll
- Specified by:
removeAllin interfaceCollection<E>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<E>
-
contains
- Specified by:
containsin interfaceCollection<E>
-
toArray
- Specified by:
toArrayin interfaceCollection<E>
-
toArray
public <T> T[] toArray(T[] array) - Specified by:
toArrayin interfaceCollection<E>
-
add
- Specified by:
addin interfaceCollection<E>
-
remove
- Specified by:
removein interfaceCollection<E>
-
containsAll
- Specified by:
containsAllin interfaceCollection<E>
-
addAll
- Specified by:
addAllin interfaceCollection<E>
-
retainAll
- Specified by:
retainAllin interfaceCollection<E>
-
clear
public void clear()- Specified by:
clearin interfaceCollection<E>
-