E
- type of the setpublic class DirtySet<E> extends SetDecorator<E>
Set
decorator that notifies the provided DirtyListener
when one ore more elements are removed.set
Constructor and Description |
---|
DirtySet(Set<E> set,
DirtyListener listener)
Constructs a new set decorator, wrapping the specified set.
|
Modifier and Type | Method and 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).
|
public DirtySet(Set<E> set, DirtyListener listener)
set
- the set to wrap with the decorator.listener
- the change observerpublic boolean remove(Object o)
SetDecorator
remove
in interface Collection<E>
remove
in interface Set<E>
remove
in class SetDecorator<E>
o
- object to be removed from the set, if present.true
if the set contained the specified element.public boolean removeAll(Collection<?> c)
SetDecorator
removeAll
in interface Collection<E>
removeAll
in interface Set<E>
removeAll
in class SetDecorator<E>
c
- collection containing elements to be removed from the set.true
if the set changed as a result of the call.public boolean retainAll(Collection<?> c)
SetDecorator
retainAll
in interface Collection<E>
retainAll
in interface Set<E>
retainAll
in class SetDecorator<E>
c
- collection containing elements to be retained in the set.true
if the set changed as a result of the call.public void clear()
SetDecorator
clear
in interface Collection<E>
clear
in interface Set<E>
clear
in class SetDecorator<E>
Copyright © 2014 ForgeRock AS. All rights reserved.