|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.webbeans.util.collections.ForwardingObject
org.jboss.webbeans.util.collections.ForwardingCollection<E>
public abstract class ForwardingCollection<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.
ForwardingObject
Constructor Summary | |
---|---|
ForwardingCollection()
|
Method Summary | ||
---|---|---|
boolean |
add(E element)
|
|
boolean |
addAll(java.util.Collection<? extends E> collection)
|
|
static
|
checkNotNull(T reference)
Ensures that an object reference passed as a parameter to the calling method is not null. |
|
void |
clear()
|
|
boolean |
contains(java.lang.Object object)
|
|
boolean |
containsAll(java.util.Collection<?> collection)
|
|
protected abstract java.util.Collection<E> |
delegate()
Returns the backing delegate instance that methods are forwarded to. |
|
boolean |
isEmpty()
|
|
java.util.Iterator<E> |
iterator()
|
|
boolean |
remove(java.lang.Object object)
|
|
boolean |
removeAll(java.util.Collection<?> collection)
|
|
boolean |
retainAll(java.util.Collection<?> collection)
|
|
int |
size()
|
|
java.lang.Object[] |
toArray()
|
|
|
toArray(T[] array)
|
Methods inherited from class org.jboss.webbeans.util.collections.ForwardingObject |
---|
toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Collection |
---|
equals, hashCode |
Constructor Detail |
---|
public ForwardingCollection()
Method Detail |
---|
protected abstract java.util.Collection<E> delegate()
ForwardingObject
ForwardingObject
method
with an abstract method that has a more specific return type, such as
ForwardingSet.delegate()
. Concrete subclasses override this method
to supply the instance being decorated.
delegate
in class ForwardingObject
public java.util.Iterator<E> iterator()
iterator
in interface java.lang.Iterable<E>
iterator
in interface java.util.Collection<E>
public int size()
size
in interface java.util.Collection<E>
public boolean removeAll(java.util.Collection<?> collection)
This method always throws a NullPointerException
when collection
is null.
removeAll
in interface java.util.Collection<E>
public boolean isEmpty()
isEmpty
in interface java.util.Collection<E>
public boolean contains(java.lang.Object object)
contains
in interface java.util.Collection<E>
public java.lang.Object[] toArray()
toArray
in interface java.util.Collection<E>
public <T> T[] toArray(T[] array)
toArray
in interface java.util.Collection<E>
public boolean add(E element)
add
in interface java.util.Collection<E>
public boolean remove(java.lang.Object object)
remove
in interface java.util.Collection<E>
public boolean containsAll(java.util.Collection<?> collection)
containsAll
in interface java.util.Collection<E>
public boolean addAll(java.util.Collection<? extends E> collection)
addAll
in interface java.util.Collection<E>
public boolean retainAll(java.util.Collection<?> collection)
This method always throws a NullPointerException
when collection
is null.
retainAll
in interface java.util.Collection<E>
public void clear()
clear
in interface java.util.Collection<E>
public static <T> T checkNotNull(T reference)
reference
- an object reference
java.lang.NullPointerException
- if reference
is null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |