Interface DeltaCollection<T>

Type Parameters:
T -
All Superinterfaces:
Collection<T>, Iterable<T>
All Known Subinterfaces:
ObservableCollection<T>, ObservableList<T>, ObservableSet<T>
All Known Implementing Classes:
DeltaCollectionBase, FilteredObservableCollection, ForwardingDeltaCollectionBase, ObservableCollectionBase, ObservableConvertingCollection, ObservableListImpl, ObservableMapImpl.ObservableKeySet, ObservableSetDifference, ObservableSetImpl, ObservableSetUnion

public interface DeltaCollection<T> extends Collection<T>
A delta collection unifies the modification methods add/addAll/remove/removeAll/clear into a single delta(Collection, Collection) method. This is very useful as a base for observable collections because any modification can be accomplished using a single method call which then only needs to fire a single CollectionChangedEvent.
Author:
raven
  • Method Details

    • replace

      default boolean replace(Collection<? extends T> newValues)
      Replace the content of this collection with the provided values
    • delta

      boolean delta(Collection<? extends T> additions, Collection<?> removals)
      Apply a delta thereby firing only a single event