Top Inners Fields Constructors Methods
impl.org.controlsfx.collections

public final Class MappingChange<E, F>

extends ListChangeListener.Change<F>
Class Inheritance
Imports
java.util.AbstractList, .List, javafx.collections.ListChangeListener.Change, .ObservableList

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface

Field Summary

Modifier and TypeField and Description
private final MappingChange.Map<E, F>
public static final MappingChange.Map<E, F>
private final ListChangeListener.Change<? extends E>
private List<F>

Constructor Summary

AccessConstructor and Description
public
MappingChange(ListChangeListener.Change<? extends E> original, MappingChange.Map<E, F> map, ObservableList<F> list)

Method Summary

Modifier and TypeMethod and Description
public int
getFrom()

Implements abstract javafx.collections.ListChangeListener.Change.getFrom.

If wasAdded() is true, the interval contains all the values that were added.

protected int[]
getPermutation()

Implements abstract javafx.collections.ListChangeListener.Change.getPermutation.

If this change is a permutation, it returns an integer array that describes the permutation.

public int
getPermutation(int i)

Overrides javafx.collections.ListChangeListener.Change.getPermutation.

This method allows developers to observe the permutations that occurred in this change.

public List<F>
getRemoved()

Implements abstract javafx.collections.ListChangeListener.Change.getRemoved.

An immutable list of removed/replaced elements.

public int
getTo()

Implements abstract javafx.collections.ListChangeListener.Change.getTo.

The end of the change interval.

public boolean
next()

Implements abstract javafx.collections.ListChangeListener.Change.next.

Goes to the next change.

public void
reset()

Implements abstract javafx.collections.ListChangeListener.Change.reset.

Resets to the initial stage.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public boolean
wasPermutated()

Overrides javafx.collections.ListChangeListener.Change.wasPermutated.

Indicates if the change was only a permutation.

public boolean
wasUpdated()

Overrides javafx.collections.ListChangeListener.Change.wasUpdated.

Indicates that the elements between getFrom() (inclusive) to getTo() exclusive has changed.

Inherited from javafx.collections.ListChangeListener.Change:
getAddedSizegetAddedSubListgetListgetRemovedSizewasAddedwasRemovedwasReplaced

Field Detail

mapback to summary
private final MappingChange.Map<E, F> map
NOOP_MAPback to summary
public static final MappingChange.Map<E, F> NOOP_MAP
originalback to summary
private final ListChangeListener.Change<? extends E> original
removedback to summary
private List<F> removed

Constructor Detail

MappingChangeback to summary
public MappingChange(ListChangeListener.Change<? extends E> original, MappingChange.Map<E, F> map, ObservableList<F> list)

Method Detail

getFromback to summary
public int getFrom()

Implements abstract javafx.collections.ListChangeListener.Change.getFrom.

Doc from javafx.collections.ListChangeListener.Change.getFrom.

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.

Annotations
@Override
getPermutationback to summary
protected int[] getPermutation()

Implements abstract javafx.collections.ListChangeListener.Change.getPermutation.

Doc from javafx.collections.ListChangeListener.Change.getPermutation.

If this change is a 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 index getFrom() of the list. The same applies for the last index and getTo(). The method is used by wasPermutated() and getPermutation(int) methods.

Annotations
@Override
getPermutationback to summary
public int getPermutation(int i)

Overrides javafx.collections.ListChangeListener.Change.getPermutation.

Doc from javafx.collections.ListChangeListener.Change.getPermutation.

This method allows developers to observe the permutations that occurred in this change. In order to get the new position of an element, you must call:

   change.getPermutation(oldIndex);
Note: default implementation of this method takes the information from getPermutation() method. You don't have to override this method.
Annotations
@Override
getRemovedback to summary
public List<F> getRemoved()

Implements abstract javafx.collections.ListChangeListener.Change.getRemoved.

Doc from javafx.collections.ListChangeListener.Change.getRemoved.

An immutable list of removed/replaced elements. If no elements were removed from the list, an empty list is returned.

Annotations
@Override
getToback to summary
public int getTo()

Implements abstract javafx.collections.ListChangeListener.Change.getTo.

Doc from javafx.collections.ListChangeListener.Change.getTo.

The end of the change interval.

Annotations
@Override
nextback to summary
public boolean next()

Implements abstract javafx.collections.ListChangeListener.Change.next.

Doc from javafx.collections.ListChangeListener.Change.next.

Goes to the next change. The Change instance, in its initial state, is invalid and requires a call to next() before calling other methods. The first next() call will make this object represent the first change.

Annotations
@Override
resetback to summary
public void reset()

Implements abstract javafx.collections.ListChangeListener.Change.reset.

Doc from javafx.collections.ListChangeListener.Change.reset.

Resets to the initial stage. After this call, next() must be called before working with the first change.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override
wasPermutatedback to summary
public boolean wasPermutated()

Overrides javafx.collections.ListChangeListener.Change.wasPermutated.

Doc from javafx.collections.ListChangeListener.Change.wasPermutated.

Indicates if the change was only a permutation.

Annotations
@Override
wasUpdatedback to summary
public boolean wasUpdated()

Overrides javafx.collections.ListChangeListener.Change.wasUpdated.

Doc from javafx.collections.ListChangeListener.Change.wasUpdated.

Indicates that the elements between getFrom() (inclusive) to getTo() exclusive has changed. This is the only optional event type and may not be fired by all ObservableLists.

Annotations
@Override
impl.org.controlsfx.collections back to summary

public Interface MappingChange.Map<E, F>


Method Summary

Modifier and TypeMethod and Description
public F
map(E original)

Method Detail

mapback to summary
public F map(E original)