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 theCollectionChange(event).L- type of theEventListener.
- 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>
ChangeAwareContainerthat is aCollection.- Since:
- 1.0.0
- See Also:
ChangeAwareList
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default booleanaddAll(E... elements)Addsall the givenelements.default booleanremoveAll(E... elements)A convenient method for var-arg usage of removaAll method.default booleanretainAll(E... elements)A convenient method for var-arg usage of retain method.default booleansetAll(E... elements)default booleansetAll(Collection<? extends E> collection)-
Methods inherited from interface java.util.Collection
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArray, toArray
-
Methods inherited from interface io.github.mmm.event.EventSource
addListener, addListener, addWeakListener, removeListener
-
-
-
-
Method Detail
-
addAll
default boolean addAll(E... elements)
Addsall the givenelements.- Parameters:
elements- the elements to add.- Returns:
trueif this collection has changed (at least one of the given elements has newly been added),falseotherwise.
-
setAll
default boolean setAll(E... elements)
- Parameters:
elements- the elements to add.- Returns:
trueif this collection has changed (at least one previous element was removed or one of the given elements has newly been added),falseotherwise.
-
setAll
default boolean setAll(Collection<? extends E> collection)
- Parameters:
collection- theCollectionwith elements to add.- Returns:
trueif this collection has changed (at least one previous element was removed or one of the given elements has newly been added),falseotherwise.
-
removeAll
default boolean removeAll(E... elements)
A convenient method for var-arg usage of removaAll method.- Parameters:
elements- the elements to be removed- Returns:
trueif this collection has changed (at least one element was removed),falseotherwise.
-
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
-
-