Interface ChangeAwareCollection<E,M extends CollectionChange<?,E>,L extends EventListener<M>>

Type Parameters:
E - the type of the elements in the container.
M - type of the CollectionChange (event).
L - type of the EventListener.
All Superinterfaces:
ChangeAwareContainer<E,M,L>, Collection<E>, EventSource<M,L>, Iterable<E>
All Known Subinterfaces:
ChangeAwareList<E>, ChangeAwareSet<E>

public interface ChangeAwareCollection<E,M extends CollectionChange<?,E>,L extends EventListener<M>> extends Collection<E>, ChangeAwareContainer<E,M,L>
Since:
1.0.0
See Also:
  • Method Details

    • addAll

      default boolean addAll(E... elements)
      Adds all the given elements.
      Parameters:
      elements - the elements to add.
      Returns:
      true if this collection has changed (at least one of the given elements has newly been added), false otherwise.
    • setAll

      default boolean setAll(E... elements)
      Clears this collection and adds all the given elements.
      Parameters:
      elements - the elements to add.
      Returns:
      true if this collection has changed (at least one previous element was removed or one of the given elements has newly been added), false otherwise.
    • setAll

      default boolean setAll(Collection<? extends E> collection)
      Clears this collection and adds all elements from the given Collection.
      Parameters:
      collection - the Collection with elements to add.
      Returns:
      true if this collection has changed (at least one previous element was removed or one of the given elements has newly been added), false otherwise.
    • removeAll

      default boolean removeAll(E... elements)
      A convenient method for var-arg usage of removaAll method.
      Parameters:
      elements - the elements to be removed
      Returns:
      true if this collection has changed (at least one element was removed), false otherwise.
    • retainAll

      default boolean retainAll(E... elements)
      A convenient method for var-arg usage of retain method.
      Parameters:
      elements - the elements to be retained
      Returns:
      true if list changed as a result of this call