public interface MaterializedListModification<E>
| Modifier and Type | Method and Description |
|---|---|
static <E> MaterializedListModification<E> |
create(int pos,
java.util.List<? extends E> removed,
java.util.List<? extends E> added)
Doesn't create defensive copies of the passed lists.
|
java.util.List<? extends E> |
getAdded() |
default 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.
|
default int |
getRemovedSize()
Returns the number of items removed by this change.
|
default int |
getTo()
Returns the end position of the change in the modified list.
|
default MaterializedListModification<E> |
trim() |
static <E> MaterializedListModification<E> create(int pos, java.util.List<? extends E> removed, java.util.List<? extends E> added)
java.util.List<? extends E> getAdded()
default int getAddedSize()
default MaterializedListModification<E> trim()
int getFrom()
default int getRemovedSize()
default int getTo()
getFrom() + getAddedSize().java.util.List<? extends E> getRemoved()
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 by
getRemovedSize().