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
Modifier and TypeFieldDescriptionprotected Collection
<E> The Collection to which this wrapper delegates. -
Constructor Summary
ModifierConstructorDescriptionprotected
Default constructorprotected
Create an AbstractWrapperCollection which delegates to the specified Collection. -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
addAll
(Collection<? extends E> c) void
clear()
boolean
boolean
containsAll
(Collection<?> c) boolean
void
protected Collection
<E> Return the Collection to which all operations should be delegated to.int
hashCode()
boolean
isEmpty()
iterator()
boolean
boolean
removeAll
(Collection<?> c) boolean
boolean
retainAll
(Collection<?> c) int
size()
stream()
Object[]
toArray()
<T> T[]
toArray
(T[] a) toString()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods 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:
size
in interfaceCollection<E>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceCollection<E>
-
contains
- Specified by:
contains
in interfaceCollection<E>
-
iterator
-
toArray
- Specified by:
toArray
in interfaceCollection<E>
-
toArray
public <T> T[] toArray(T[] a) - Specified by:
toArray
in interfaceCollection<E>
-
add
- Specified by:
add
in interfaceCollection<E>
-
remove
- Specified by:
remove
in interfaceCollection<E>
-
containsAll
- Specified by:
containsAll
in interfaceCollection<E>
-
addAll
- Specified by:
addAll
in interfaceCollection<E>
-
retainAll
- Specified by:
retainAll
in interfaceCollection<E>
-
removeAll
- Specified by:
removeAll
in interfaceCollection<E>
-
clear
public void clear()- Specified by:
clear
in interfaceCollection<E>
-
spliterator
- Specified by:
spliterator
in interfaceCollection<E>
- Specified by:
spliterator
in interfaceIterable<E>
-
removeIf
- Specified by:
removeIf
in interfaceCollection<E>
-
stream
- Specified by:
stream
in interfaceCollection<E>
-
parallelStream
- Specified by:
parallelStream
in interfaceCollection<E>
-
forEach
-
equals
- Specified by:
equals
in interfaceCollection<E>
- Overrides:
equals
in classObject
-
hashCode
public int hashCode()- Specified by:
hashCode
in interfaceCollection<E>
- Overrides:
hashCode
in classObject
-
toString
-