T
- the type of itemsU
- the type of items of the underlying/wrapped collectionpublic abstract class CollectionWrapper<T,U> extends Object implements Collection<T>
Collection
, making it look (and function) like a collection
holding another type of items. The wrapper delegates to its underlying
collection instead of keeping track of the items itself.Constructor and Description |
---|
CollectionWrapper(Collection<U> underlyingCollection) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(T o) |
boolean |
addAll(Collection c) |
void |
clear() |
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() |
<R> R[] |
toArray(R[] a) |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
equals, hashCode
public CollectionWrapper(Collection<U> underlyingCollection)
public boolean add(T o)
add
in interface Collection<T>
public void clear()
clear
in interface Collection<T>
public boolean contains(Object o)
contains
in interface Collection<T>
public boolean isEmpty()
isEmpty
in interface Collection<T>
public boolean remove(Object o)
remove
in interface Collection<T>
public int size()
size
in interface Collection<T>
public boolean retainAll(Collection c)
retainAll
in interface Collection<T>
public boolean addAll(Collection c)
addAll
in interface Collection<T>
public boolean removeAll(Collection c)
removeAll
in interface Collection<T>
public boolean containsAll(Collection c)
containsAll
in interface Collection<T>
public Object[] toArray()
toArray
in interface Collection<T>
public <R> R[] toArray(R[] a)
toArray
in interface Collection<T>
Copyright © 2002–2014 The Neo4j Graph Database Project. All rights reserved.