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>
A
Set decorator that notifies the provided DirtyListener when one ore more elements are removed.-
Field Summary
Fields inherited from class org.forgerock.http.util.SetDecorator
set -
Constructor Summary
ConstructorsConstructorDescriptionDirtySet(Set<E> set, DirtyListener listener) Constructs a new set decorator, wrapping the specified set. -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Removes all of the elements from the set (optional operation).iterator()booleanRemoves 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, toArrayMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.Set
spliterator
-
Constructor Details
-
DirtySet
Constructs a new set decorator, wrapping the specified set.- Parameters:
set- the set to wrap with the decorator.listener- the change observer
-
-
Method Details
-
iterator
-
remove
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
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
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>
-