getFrom()), a list of elements removed by the modification
(getRemoved()), and the number of added elements replacing the
removed elements (getAddedSize()).
Subtypes of this interface differ in how they refer to the added elements:
ListModification holds a reference to the observable list
in which the modification occurred and the
ListModification#getAddedSubList() method returns a sublist view
of the original observable list. Such sublist is valid only until the
next list modification.
MaterializedListModification has its own copy of added
elements (MaterializedListModification#getAdded()), thus the
validity of the list of added elements returned from getAdded()
is not restricted.
QuasiListModification does not provide a way to get the
added elements directly, but has to be combined with the observable list
to obtain ListModification
(QuasiListModification#instantiate(QuasiListModification, ObservableList))
or MaterializedListModification
(QuasiListModification#materialize(QuasiListModification, ObservableList)).
| Modifier and Type | Method and Description |
|---|---|
| public int | |
| public int | |
| public List | |
| public default int | |
| public default int |
| getAddedSize | back to summary |
|---|---|
| public int getAddedSize() Returns the number of items added by this change. | |
| getFrom | back to summary |
|---|---|
| public int getFrom() Returns the position in the list where this change occurred. | |
| getRemoved | back to summary |
|---|---|
| public List Returns an immutable list of elements removed by this change.
Before the change occurred, the first element of the returned list
was at index | |
| getRemovedSize | back to summary |
|---|---|
| public default int getRemovedSize() Returns the number of items removed by this change. | |
| getTo | back to summary |
|---|---|
| public default int getTo() Returns the end position of the change in the modified list.
The returned value is equal to | |