Package com.sun.javafx.collections
Class NonIterableChange<E>
java.lang.Object
javafx.collections.ListChangeListener.Change<E>
com.sun.javafx.collections.NonIterableChange<E>
- Direct Known Subclasses:
NonIterableChange.GenericAddRemoveChange
,NonIterableChange.SimpleAddChange
,NonIterableChange.SimplePermutationChange
,NonIterableChange.SimpleRemovedChange
,NonIterableChange.SimpleUpdateChange
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
static class
static class
static class
-
Constructor Summary
ModifierConstructorDescriptionprotected
NonIterableChange
(int from, int to, ObservableList<E> list) -
Method Summary
Modifier and TypeMethodDescriptionvoid
int
getFrom()
If wasAdded is true, the interval contains all the values that were added.protected int[]
If this change is an permutation, it returns an integer array that describes the permutation.int
getTo()
The end of the change interval.boolean
next()
Go to the next change.void
reset()
Reset to the initial stage.toString()
Methods inherited from class javafx.collections.ListChangeListener.Change
getAddedSize, getAddedSubList, getList, getPermutation, getRemoved, getRemovedSize, wasAdded, wasPermutated, wasRemoved, wasReplaced, wasUpdated
-
Constructor Details
-
NonIterableChange
-
-
Method Details
-
getFrom
public int getFrom()Description copied from class:ListChangeListener.Change
If wasAdded is true, the interval contains all the values that were added. If wasPermutated is true, the interval marks the values that were permutated. If wasRemoved is true and wasAdded is false, getFrom() and getTo() should return the same number - the place where the removed elements were positioned in the list.- Specified by:
getFrom
in classListChangeListener.Change<E>
- Returns:
- a beginning (inclusive) of an interval related to the change
-
getTo
public int getTo()Description copied from class:ListChangeListener.Change
The end of the change interval.- Specified by:
getTo
in classListChangeListener.Change<E>
- Returns:
- a end (exclusive) of an interval related to the change.
- See Also:
-
getPermutation
protected int[] getPermutation()Description copied from class:ListChangeListener.Change
If this change is an permutation, it returns an integer array that describes the permutation. This array maps directly from the previous indexes to the new ones. This method is not publicly accessible and therefore can return an array safely. The 0 index of the array corresponds to indexListChangeListener.Change.getFrom()
of the list. The same applies for the last index andListChangeListener.Change.getTo()
. The method is used byListChangeListener.Change.wasPermutated()
andListChangeListener.Change.getPermutation(int)
methods.- Specified by:
getPermutation
in classListChangeListener.Change<E>
- Returns:
- empty array if this is not permutation or an integer array containing the permutation
-
next
public boolean next()Description copied from class:ListChangeListener.Change
Go to the next change. The Change in the initial state is invalid a requires a call to next() before calling other methods. The first next() call will make this object represent the first change.- Specified by:
next
in classListChangeListener.Change<E>
- Returns:
- true if switched to the next change, false if this is the last change.
-
reset
public void reset()Description copied from class:ListChangeListener.Change
Reset to the initial stage. After this call, the next() must be called before working with the first change.- Specified by:
reset
in classListChangeListener.Change<E>
-
checkState
public void checkState() -
toString
-