public final class MappingChange<E,F> extends ListChangeListener.Change<F>
| Modifier and Type | Class and Description |
|---|---|
static interface |
MappingChange.Map<E,F> |
| Modifier and Type | Field and Description |
|---|---|
private MappingChange.Map<E,F> |
map |
static MappingChange.Map |
NOOP_MAP |
private ListChangeListener.Change<? extends E> |
original |
private java.util.List<F> |
removed |
| Constructor and Description |
|---|
MappingChange(ListChangeListener.Change<? extends E> original,
MappingChange.Map<E,F> map,
ObservableList<F> list) |
| Modifier and Type | Method and Description |
|---|---|
int |
getFrom()
If wasAdded is true, the interval contains all the values that were added.
|
protected int[] |
getPermutation()
If this change is an permutation, it returns an integer array
that describes the permutation.
|
int |
getPermutation(int i)
By calling these method, you can observe the permutation that happened.
|
java.util.List<F> |
getRemoved()
An immutable list of removed/replaced elements.
|
int |
getTo()
The end of the change interval.
|
boolean |
next()
Go to the next change.
|
void |
reset()
Reset to the initial stage.
|
java.lang.String |
toString() |
boolean |
wasPermutated()
Indicates if the change was only a permutation.
|
boolean |
wasUpdated()
Indicates that the elements between getFrom() (inclusive)
to getTo() exclusive has changed.
|
getAddedSize, getAddedSubList, getList, getRemovedSize, wasAdded, wasRemoved, wasReplacedprivate final MappingChange.Map<E,F> map
private final ListChangeListener.Change<? extends E> original
private java.util.List<F> removed
public static final MappingChange.Map NOOP_MAP
public MappingChange(ListChangeListener.Change<? extends E> original, MappingChange.Map<E,F> map, ObservableList<F> list)
public boolean next()
ListChangeListener.Changenext in class ListChangeListener.Change<F>public void reset()
ListChangeListener.Changereset in class ListChangeListener.Change<F>public int getFrom()
ListChangeListener.ChangegetFrom in class ListChangeListener.Change<F>public int getTo()
ListChangeListener.ChangegetTo in class ListChangeListener.Change<F>ListChangeListener.Change.getFrom()public java.util.List<F> getRemoved()
ListChangeListener.ChangegetRemoved in class ListChangeListener.Change<F>protected int[] getPermutation()
ListChangeListener.ChangeListChangeListener.Change.getFrom() of the list. The same applies
for the last index and ListChangeListener.Change.getTo().
The method is used by ListChangeListener.Change.wasPermutated() and ListChangeListener.Change.getPermutation(int) methods.getPermutation in class ListChangeListener.Change<F>public boolean wasPermutated()
ListChangeListener.ChangewasPermutated in class ListChangeListener.Change<F>public boolean wasUpdated()
ListChangeListener.ChangewasUpdated in class ListChangeListener.Change<F>public int getPermutation(int i)
ListChangeListener.Change
change.getPermutation(oldIndex);
Note: default implementation of this method takes the information
from ListChangeListener.Change.getPermutation() method. You don't have to override this method.getPermutation in class ListChangeListener.Change<F>i - the old index that contained the element prior to this changepublic java.lang.String toString()
toString in class java.lang.Object