Class DirtySet<E>

  • Type Parameters:
    E - type of the set
    All Implemented Interfaces:
    Iterable<E>, Collection<E>, Set<E>

    public class DirtySet<E>
    extends org.forgerock.http.util.SetDecorator<E>
    A Set decorator that notifies the provided DirtyListener when one ore more elements are removed.
    • 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)
        Specified by:
        remove in interface Collection<E>
        Specified by:
        remove in interface Set<E>
        Overrides:
        remove in class org.forgerock.http.util.SetDecorator<E>
      • removeAll

        public boolean removeAll​(Collection<?> c)
        Specified by:
        removeAll in interface Collection<E>
        Specified by:
        removeAll in interface Set<E>
        Overrides:
        removeAll in class org.forgerock.http.util.SetDecorator<E>
      • retainAll

        public boolean retainAll​(Collection<?> c)
        Specified by:
        retainAll in interface Collection<E>
        Specified by:
        retainAll in interface Set<E>
        Overrides:
        retainAll in class org.forgerock.http.util.SetDecorator<E>
      • clear

        public void clear()
        Specified by:
        clear in interface Collection<E>
        Specified by:
        clear in interface Set<E>
        Overrides:
        clear in class org.forgerock.http.util.SetDecorator<E>