Package com.tangosol.util
Class WrapperCollections.AbstractWrapperCollection<E>
java.lang.Object
com.tangosol.util.WrapperCollections.AbstractWrapperCollection<E>
- All Implemented Interfaces:
Serializable,Iterable<E>,Collection<E>
- Direct Known Subclasses:
WrapperCollections.AbstractWrapperList,WrapperCollections.AbstractWrapperSet
- Enclosing class:
WrapperCollections
public abstract static class WrapperCollections.AbstractWrapperCollection<E>
extends Object
implements Collection<E>, Serializable
Collection implementation which delegates all calls to another Collection.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Collection<E> The Collection to which this wrapper delegates. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefault constructorprotectedCreate an AbstractWrapperCollection which delegates to the specified Collection. -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanaddAll(Collection<? extends E> c) voidclear()booleanbooleancontainsAll(Collection<?> c) booleanvoidprotected Collection<E> Return the Collection to which all operations should be delegated to.inthashCode()booleanisEmpty()iterator()booleanbooleanremoveAll(Collection<?> c) booleanbooleanretainAll(Collection<?> c) intsize()stream()Object[]toArray()<T> T[]toArray(T[] a) toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
toArray
-
Field Details
-
m_colDelegate
The Collection to which this wrapper delegates.
-
-
Constructor Details
-
AbstractWrapperCollection
protected AbstractWrapperCollection()Default constructor -
AbstractWrapperCollection
Create an AbstractWrapperCollection which delegates to the specified Collection.- Parameters:
col- the Collection to delegate all calls to
-
-
Method Details
-
getDelegate
Return the Collection to which all operations should be delegated to.- Returns:
- the wrapped Collection
-
size
public int size()- Specified by:
sizein interfaceCollection<E>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<E>
-
contains
- Specified by:
containsin interfaceCollection<E>
-
iterator
-
toArray
- Specified by:
toArrayin interfaceCollection<E>
-
toArray
public <T> T[] toArray(T[] a) - 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>
-
removeAll
- Specified by:
removeAllin interfaceCollection<E>
-
clear
public void clear()- Specified by:
clearin interfaceCollection<E>
-
spliterator
- Specified by:
spliteratorin interfaceCollection<E>- Specified by:
spliteratorin interfaceIterable<E>
-
removeIf
- Specified by:
removeIfin interfaceCollection<E>
-
stream
- Specified by:
streamin interfaceCollection<E>
-
parallelStream
- Specified by:
parallelStreamin interfaceCollection<E>
-
forEach
-
equals
- Specified by:
equalsin interfaceCollection<E>- Overrides:
equalsin classObject
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceCollection<E>- Overrides:
hashCodein classObject
-
toString
-