Package org.reactfx.collection
Class ListChangeAccumulator<E>
- java.lang.Object
-
- org.reactfx.collection.ListChangeAccumulator<E>
-
- All Implemented Interfaces:
java.lang.Iterable<QuasiListModification<? extends E>>
,AbstractListModificationSequence<E,QuasiListModification<? extends E>>
,ListModificationSequence<E>
public final class ListChangeAccumulator<E> extends java.lang.Object implements ListModificationSequence<E>
-
-
Field Summary
Fields Modifier and Type Field Description private QuasiListChangeImpl<E>
modifications
-
Constructor Summary
Constructors Constructor Description ListChangeAccumulator()
ListChangeAccumulator(QuasiListChange<E> change)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ListChangeAccumulator<E>
add(javafx.collections.ListChangeListener.Change<? extends E> change)
ListChangeAccumulator<E>
add(QuasiListChange<? extends E> change)
ListChangeAccumulator<E>
add(QuasiListModification<? extends E> mod)
QuasiListChange<E>
asListChange()
May be destructive for this object.ListChangeAccumulator<E>
asListChangeAccumulator()
May be destructive for this object.private static <E> QuasiListModification<E>
combine(QuasiListModification<? extends E> former, QuasiListModification<? extends E> latter)
ListChangeAccumulator<E>
drop(int n)
QuasiListChange<E>
fetch()
java.util.List<QuasiListModification<? extends E>>
getModifications()
boolean
isEmpty()
private static <E> QuasiListModification<? extends E>
join(java.util.List<QuasiListModification<? extends E>> mods, java.util.List<? extends E> gone, int goneOffset)
private void
offsetPendingModifications(int from, int offset)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.reactfx.collection.AbstractListModificationSequence
getModificationCount, iterator
-
-
-
-
Field Detail
-
modifications
private QuasiListChangeImpl<E> modifications
-
-
Constructor Detail
-
ListChangeAccumulator
public ListChangeAccumulator()
-
ListChangeAccumulator
public ListChangeAccumulator(QuasiListChange<E> change)
-
-
Method Detail
-
asListChangeAccumulator
public ListChangeAccumulator<E> asListChangeAccumulator()
Description copied from interface:ListModificationSequence
May be destructive for this object. Therefore, this object should not be used after the call to this method, unless stated otherwise by the implementing class/interface.- Specified by:
asListChangeAccumulator
in interfaceListModificationSequence<E>
-
asListChange
public QuasiListChange<E> asListChange()
Description copied from interface:ListModificationSequence
May be destructive for this object. Therefore, this object should not be used after the call to this method, unless stated otherwise by the implementing class/interface.- Specified by:
asListChange
in interfaceListModificationSequence<E>
-
getModifications
public java.util.List<QuasiListModification<? extends E>> getModifications()
- Specified by:
getModifications
in interfaceAbstractListModificationSequence<E,QuasiListModification<? extends E>>
-
isEmpty
public boolean isEmpty()
-
fetch
public QuasiListChange<E> fetch()
-
drop
public ListChangeAccumulator<E> drop(int n)
-
add
public ListChangeAccumulator<E> add(QuasiListModification<? extends E> mod)
-
add
public ListChangeAccumulator<E> add(QuasiListChange<? extends E> change)
-
add
public ListChangeAccumulator<E> add(javafx.collections.ListChangeListener.Change<? extends E> change)
-
offsetPendingModifications
private void offsetPendingModifications(int from, int offset)
-
join
private static <E> QuasiListModification<? extends E> join(java.util.List<QuasiListModification<? extends E>> mods, java.util.List<? extends E> gone, int goneOffset)
-
combine
private static <E> QuasiListModification<E> combine(QuasiListModification<? extends E> former, QuasiListModification<? extends E> latter)
-
-