public abstract class CollectionWrapper<T>
extends java.lang.Object
implements java.util.Collection<T>
Modifier and Type | Field and Description |
---|---|
protected java.util.Collection<T> |
delegate
The delegate list.
|
Constructor and Description |
---|
CollectionWrapper(java.util.Collection<T> delegate)
Create a new wrapper.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(T e) |
boolean |
addAll(java.util.Collection<? extends T> c) |
void |
clear() |
boolean |
contains(java.lang.Object o) |
boolean |
containsAll(java.util.Collection<?> c) |
protected abstract void |
entryAdded(T value,
int index)
An entry was added to the collection.
|
protected abstract void |
entryChanged(T oldvalue,
T newvalue,
int index)
An entry was changed in the collection.
|
protected abstract void |
entryRemoved(T value,
int index)
An entry was removed from the collection.
|
boolean |
equals(java.lang.Object obj)
Test if this object equals another.
|
int |
hashCode()
Get the hashcode of the object.
|
boolean |
isEmpty() |
java.util.Iterator<T> |
iterator() |
boolean |
remove(java.lang.Object o) |
boolean |
removeAll(java.util.Collection<?> c) |
boolean |
retainAll(java.util.Collection<?> c) |
int |
size()
Get the size.
|
java.lang.Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
java.lang.String |
toString()
Get the string representation.
|
protected java.util.Collection<T> delegate
public CollectionWrapper(java.util.Collection<T> delegate)
delegate
- The delegate.public int size()
size
in interface java.util.Collection<T>
public boolean isEmpty()
isEmpty
in interface java.util.Collection<T>
public boolean contains(java.lang.Object o)
contains
in interface java.util.Collection<T>
public java.util.Iterator<T> iterator()
public java.lang.Object[] toArray()
toArray
in interface java.util.Collection<T>
public <T> T[] toArray(T[] a)
toArray
in interface java.util.Collection<T>
public boolean remove(java.lang.Object o)
remove
in interface java.util.Collection<T>
public boolean containsAll(java.util.Collection<?> c)
containsAll
in interface java.util.Collection<T>
public boolean addAll(java.util.Collection<? extends T> c)
addAll
in interface java.util.Collection<T>
public boolean removeAll(java.util.Collection<?> c)
removeAll
in interface java.util.Collection<T>
public boolean retainAll(java.util.Collection<?> c)
retainAll
in interface java.util.Collection<T>
public void clear()
clear
in interface java.util.Collection<T>
public int hashCode()
hashCode
in interface java.util.Collection<T>
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in interface java.util.Collection<T>
equals
in class java.lang.Object
obj
- The other object.public java.lang.String toString()
toString
in class java.lang.Object
protected abstract void entryAdded(T value, int index)
protected abstract void entryRemoved(T value, int index)