Class ChangeAwareSets

    • Method Detail

      • empty

        public static <E> ChangeAwareSet<E> empty()
        Type Parameters:
        E - the type of the elements.
        Returns:
        an empty, immutable ChangeAwareSet.
      • of

        public static <E> ChangeAwareSet<E> of()
        Type Parameters:
        E - the type of the elements.
        Returns:
        a new empty mutable ChangeAwareSet.
      • of

        public static <E> ChangeAwareSet<E> of​(int capacity)
        Type Parameters:
        E - the type of the elements.
        Parameters:
        capacity - the initial capacity of the set.
        Returns:
        a new empty mutable ChangeAwareSet.
      • of

        public static <E> ChangeAwareSet<E> of​(Set<E> set)
        Type Parameters:
        E - the type of the elements.
        Parameters:
        set - the existing Set implementation to wrap as ChangeAwareSet. Please avoid to modify this Set afterwards, as this will not trigger modification events.
        Returns:
        a new empty mutable ChangeAwareSet.
      • ofUnmodifiable

        public static <E> ChangeAwareSet<E> ofUnmodifiable​(Set<E> set)
        Type Parameters:
        E - the type of the elements.
        Parameters:
        set - the existing List implementation to wrap as ChangeAwareList. Please avoid to modify this List afterwards, as this will not trigger modification events.
        Returns:
        a new empty mutable ChangeAwareList.