Package org.reactfx.collection
Class QuasiListModificationImpl<E>
- java.lang.Object
-
- org.reactfx.collection.QuasiListModificationImpl<E>
-
- All Implemented Interfaces:
ListModificationLike<E>
,QuasiListModification<E>
class QuasiListModificationImpl<E> extends java.lang.Object implements QuasiListModification<E>
-
-
Constructor Summary
Constructors Constructor Description QuasiListModificationImpl(int position, java.util.List<? extends E> removed, int addedSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getAddedSize()
Returns the number of items added by this change.int
getFrom()
Returns the position in the list where this change occurred.java.util.List<? extends E>
getRemoved()
Returns an immutable list of elements removed by this change.java.lang.String
toString()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.reactfx.collection.ListModificationLike
getRemovedSize, getTo
-
Methods inherited from interface org.reactfx.collection.QuasiListModification
asListChange, instantiate, materialize
-
-
-
-
Field Detail
-
position
private final int position
-
removed
private final java.util.List<? extends E> removed
-
addedSize
private final int addedSize
-
-
Constructor Detail
-
QuasiListModificationImpl
QuasiListModificationImpl(int position, java.util.List<? extends E> removed, int addedSize)
-
-
Method Detail
-
getFrom
public int getFrom()
Description copied from interface:ListModificationLike
Returns the position in the list where this change occurred.- Specified by:
getFrom
in interfaceListModificationLike<E>
-
getAddedSize
public int getAddedSize()
Description copied from interface:ListModificationLike
Returns the number of items added by this change.- Specified by:
getAddedSize
in interfaceListModificationLike<E>
-
getRemoved
public java.util.List<? extends E> getRemoved()
Description copied from interface:ListModificationLike
Returns an immutable list of elements removed by this change. Before the change occurred, the first element of the returned list was at indexListModificationLike.getFrom()
in the original list. If no elements were removed by this change, returns an empty list. The size of the returned list is equal to the value returned byListModificationLike.getRemovedSize()
.- Specified by:
getRemoved
in interfaceListModificationLike<E>
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-