Class DirtyCollection<E>
- java.lang.Object
 - 
- org.forgerock.openig.session.jwt.dirty.DirtyCollection<E>
 
 
- 
- Type Parameters:
 E- type of the collection
- All Implemented Interfaces:
 Iterable<E>,Collection<E>
public class DirtyCollection<E> extends Object implements Collection<E>
ACollectiondecorator that notifies the providedDirtyListenerwhen one ore more elements are removed. 
- 
- 
Constructor Summary
Constructors Constructor Description DirtyCollection(Collection<E> delegate, DirtyListener listener)Builds a new DirtyCollection delegating to the given Collection and notifying the provided observer. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(E e)booleanaddAll(Collection<? extends E> c)voidclear()booleancontains(Object o)booleancontainsAll(Collection<?> c)booleanequals(Object o)inthashCode()booleanisEmpty()Iterator<E>iterator()booleanremove(Object o)booleanremoveAll(Collection<?> c)booleanretainAll(Collection<?> c)intsize()Object[]toArray()<T> T[]toArray(T[] a)- 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait 
- 
Methods inherited from interface java.util.Collection
parallelStream, removeIf, spliterator, stream, toArray 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
DirtyCollection
public DirtyCollection(Collection<E> delegate, DirtyListener listener)
Builds a new DirtyCollection delegating to the given Collection and notifying the provided observer.- Parameters:
 delegate- Collection delegatelistener- change observer
 
 - 
 
- 
Method Detail
- 
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>
 
- 
retainAll
public boolean retainAll(Collection<?> c)
- Specified by:
 retainAllin interfaceCollection<E>
 
- 
clear
public void clear()
- Specified by:
 clearin interfaceCollection<E>
 
- 
equals
public boolean equals(Object o)
- Specified by:
 equalsin interfaceCollection<E>- Overrides:
 equalsin classObject
 
- 
hashCode
public int hashCode()
- Specified by:
 hashCodein interfaceCollection<E>- Overrides:
 hashCodein classObject
 
 - 
 
 -