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>
ASet
decorator that notifies the providedDirtyListener
when 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 void
clear()
Removes all of the elements from the set (optional operation).Iterator<E>
iterator()
boolean
remove(Object o)
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 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: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
public boolean removeAll(Collection<?> c)
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
public boolean retainAll(Collection<?> c)
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>
-
-