Class DirtySet<E>
- java.lang.Object
-
- org.forgerock.http.util.SetDecorator<E>
-
- org.forgerock.openig.session.jwt.dirty.DirtySet<E>
-
- Type Parameters:
E- type of the set
- All Implemented Interfaces:
Iterable<E>,Collection<E>,Set<E>
public class DirtySet<E> extends SetDecorator<E>
ASetdecorator that notifies the providedDirtyListenerwhen one ore more elements are removed.
-
-
Field Summary
-
Fields inherited from class org.forgerock.http.util.SetDecorator
set
-
-
Constructor Summary
Constructors Constructor Description DirtySet(Set<E> set, DirtyListener listener)Constructs a new set decorator, wrapping the specified set.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Removes all of the elements from the set (optional operation).Iterator<E>iterator()booleanremove(Object o)Removes the specified element from the set if it is present (optional operation).booleanremoveAll(Collection<?> c)Removes from the set all of its elements that are contained in the specified collection (optional operation).booleanretainAll(Collection<?> c)Retains only the elements in the set that are contained in the specified collection (optional operation).-
Methods inherited from class org.forgerock.http.util.SetDecorator
add, addAll, contains, containsAll, equals, hashCode, isEmpty, size, toArray, toArray
-
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, stream, toArray
-
Methods inherited from interface java.util.Set
spliterator
-
-
-
-
Constructor Detail
-
DirtySet
public DirtySet(Set<E> set, DirtyListener listener)
Constructs a new set decorator, wrapping the specified set.- Parameters:
set- the set to wrap with the decorator.listener- the change observer
-
-
Method Detail
-
remove
public boolean remove(Object o)
Description copied from class:SetDecoratorRemoves the specified element from the set if it is present (optional operation).- Specified by:
removein interfaceCollection<E>- Specified by:
removein interfaceSet<E>- Overrides:
removein classSetDecorator<E>- Parameters:
o- object to be removed from the set, if present.- Returns:
trueif the set contained the specified element.
-
removeAll
public boolean removeAll(Collection<?> c)
Description copied from class:SetDecoratorRemoves from the set all of its elements that are contained in the specified collection (optional operation).- Specified by:
removeAllin interfaceCollection<E>- Specified by:
removeAllin interfaceSet<E>- Overrides:
removeAllin classSetDecorator<E>- Parameters:
c- collection containing elements to be removed from the set.- Returns:
trueif the set changed as a result of the call.
-
retainAll
public boolean retainAll(Collection<?> c)
Description copied from class:SetDecoratorRetains only the elements in the set that are contained in the specified collection (optional operation).- Specified by:
retainAllin interfaceCollection<E>- Specified by:
retainAllin interfaceSet<E>- Overrides:
retainAllin classSetDecorator<E>- Parameters:
c- collection containing elements to be retained in the set.- Returns:
trueif the set changed as a result of the call.
-
clear
public void clear()
Description copied from class:SetDecoratorRemoves all of the elements from the set (optional operation).- Specified by:
clearin interfaceCollection<E>- Specified by:
clearin interfaceSet<E>- Overrides:
clearin classSetDecorator<E>
-
-