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
ConstructorDescriptionDirtySet
(Set<E> set, DirtyListener listener) Constructs a new set decorator, wrapping the specified set. -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Removes all of the elements from the set (optional operation).iterator()
boolean
Removes the specified element from the set if it is present (optional operation).boolean
removeAll
(Collection<?> c) Removes from the set all of its elements that are contained in the specified collection (optional operation).boolean
retainAll
(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 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:SetDecorator
Removes the specified element from the set if it is present (optional operation).- Specified by:
remove
in interfaceCollection<E>
- Specified by:
remove
in interfaceSet<E>
- Overrides:
remove
in classSetDecorator<E>
- Parameters:
o
- object to be removed from the set, if present.- Returns:
true
if the set contained the specified element.
-
removeAll
Description copied from class:SetDecorator
Removes from the set all of its elements that are contained in the specified collection (optional operation).- Specified by:
removeAll
in interfaceCollection<E>
- Specified by:
removeAll
in interfaceSet<E>
- Overrides:
removeAll
in classSetDecorator<E>
- Parameters:
c
- collection containing elements to be removed from the set.- Returns:
true
if the set changed as a result of the call.
-
retainAll
Description copied from class:SetDecorator
Retains only the elements in the set that are contained in the specified collection (optional operation).- Specified by:
retainAll
in interfaceCollection<E>
- Specified by:
retainAll
in interfaceSet<E>
- Overrides:
retainAll
in classSetDecorator<E>
- Parameters:
c
- collection containing elements to be retained in the set.- Returns:
true
if the set changed as a result of the call.
-
clear
public void clear()Description copied from class:SetDecorator
Removes all of the elements from the set (optional operation).- Specified by:
clear
in interfaceCollection<E>
- Specified by:
clear
in interfaceSet<E>
- Overrides:
clear
in classSetDecorator<E>
-