Package org.infinispan.commons.util
Class AbstractDelegatingCollection<E>
- java.lang.Object
-
- org.infinispan.commons.util.AbstractDelegatingCollection<E>
-
- Type Parameters:
E- The type of collection
- All Implemented Interfaces:
Iterable<E>,Collection<E>
- Direct Known Subclasses:
AbstractDelegatingCloseableIteratorCollection,AbstractDelegatingSet,ReadOnlySegmentAwareCollection
public abstract class AbstractDelegatingCollection<E> extends Object implements Collection<E>
Delegating collection that delegates all calls to the collection returned fromdelegate()
-
-
Constructor Summary
Constructors Constructor Description AbstractDelegatingCollection()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanadd(E e)booleanaddAll(Collection<? extends E> c)voidclear()booleancontains(Object o)booleancontainsAll(Collection<?> c)protected abstract Collection<E>delegate()voidforEach(Consumer<? super E> action)booleanisEmpty()Iterator<E>iterator()Stream<E>parallelStream()booleanremove(Object o)booleanremoveAll(Collection<?> c)booleanremoveIf(Predicate<? super E> filter)booleanretainAll(Collection<?> c)intsize()Spliterator<E>spliterator()Stream<E>stream()Object[]toArray()<T> T[]toArray(T[] a)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Collection
equals, hashCode, toArray
-
-
-
-
Method Detail
-
delegate
protected abstract Collection<E> delegate()
-
size
public int size()
- Specified by:
sizein interfaceCollection<E>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceCollection<E>
-
contains
public boolean contains(Object o)
- Specified by:
containsin interfaceCollection<E>
-
toArray
public Object[] toArray()
- Specified by:
toArrayin interfaceCollection<E>
-
toArray
public <T> T[] toArray(T[] a)
- Specified by:
toArrayin interfaceCollection<E>
-
add
public boolean add(E e)
- Specified by:
addin interfaceCollection<E>
-
remove
public boolean remove(Object o)
- Specified by:
removein interfaceCollection<E>
-
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAllin interfaceCollection<E>
-
addAll
public boolean addAll(Collection<? extends E> c)
- Specified by:
addAllin interfaceCollection<E>
-
removeAll
public boolean removeAll(Collection<?> c)
- Specified by:
removeAllin interfaceCollection<E>
-
removeIf
public boolean removeIf(Predicate<? super E> filter)
- Specified by:
removeIfin interfaceCollection<E>
-
retainAll
public boolean retainAll(Collection<?> c)
- Specified by:
retainAllin interfaceCollection<E>
-
clear
public void clear()
- Specified by:
clearin interfaceCollection<E>
-
spliterator
public Spliterator<E> spliterator()
- Specified by:
spliteratorin interfaceCollection<E>- Specified by:
spliteratorin interfaceIterable<E>
-
stream
public Stream<E> stream()
- Specified by:
streamin interfaceCollection<E>
-
parallelStream
public Stream<E> parallelStream()
- Specified by:
parallelStreamin interfaceCollection<E>
-
-