baku-toolkit/lib/src/main/java/io/v/baku/toolkit/bind/DerivedListDeltaAccumulator.java
/**
         * Algorithm:
         *
         * 1. Notify of all removals.
         * 2. Notify of moves to reorder intersection.
         * 3. Notify of all insertions.
         *
         * This algorithm does not trigger any item change events, preferring remove/insert instead.
         * Also, it fails if any items are not unique.
         */
1. Notify of all removals.
2. Notify of moves to reorder intersection.
3. Notify of all insertions.

This algorithm does not trigger any item change events, preferring remove/insert instead.
Also, it fails if any items are not unique.
1 . Notify of all removals . 2 . Notify of moves to reorder intersection . 3 . Notify of all insertions . This algorithm does not trigger any item change events preferring remove / insert instead . Also it fails if any items are not unique .
DiffContext<T> diff(final ListAccumulator<T> a, final ListAccumulator<T> b) {
            if (a == null) {
                steps.add(new DerivedListDeltaAccumulator<>(ids, b));
            } else {
                final ImmutableList<T>
                        aList = a.getListSnapshot(),
                        bList = b.getListSnapshot();
                final ImmutableSet<T>
                        aItems = ImmutableSet.copyOf(aList),
                        bItems = ImmutableSet.copyOf(bList);
                final List<T> mutable = processRemovals(aList, bItems);
                final List<T> to = new ArrayList<>(bList);
                to.retainAll(aItems);
                processMoves(mutable, to);
                processInsertions(mutable, bList);
            }
            return this;
        }
DiffContext < T > diff ( final ListAccumulator < T > a , final ListAccumulator < T > b ) { if ( a == null ) { steps . add ( new DerivedListDeltaAccumulator < > ( ids , b ) ) ; } else { final ImmutableList < T > aList = a . getListSnapshot ( ) , bList = b . getListSnapshot ( ) ; final ImmutableSet < T > aItems = ImmutableSet . copyOf ( aList ) , bItems = ImmutableSet . copyOf ( bList ) ; final List < T > mutable = processRemovals ( aList , bItems ) ; final List < T > to = new ArrayList < > ( bList ) ; to . retainAll ( aItems ) ; processMoves ( mutable , to ) ; processInsertions ( mutable , bList ) ; } return this ; }
Algorithm:
 1.
Algorithm : 1 .