Top Inners Fields Constructors Methods
javafx.collections

pack-priv final Class ListChangeBuilder<E>

extends Object
Class Inheritance
Imports
com.sun.javafx.collections.ChangeHelper, java.util.ArrayList, .Collections, .HashMap, .List, .Map, .Map.Entry, .Set, .TreeSet, javafx.collections.ListChangeListener.Change

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private static class
private static class

Field Summary

Modifier and TypeField and Description
private List<ListChangeBuilder.SubChange<E>>
private int
private static final int[]
private final ObservableListBase<E>
private ListChangeBuilder.SubChange<E>
private List<ListChangeBuilder.SubChange<E>>

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
private void
private void
private void
private int
public void
private static <E> ListChangeBuilder.SubChange<E>
private static <E> ListChangeBuilder.SubChange<E>[]
private int
findSubChange(int idx, final List<ListChangeBuilder.SubChange<E>> list)

private void
insertAdd(int from, int to)

private void
insertRemoved(int pos, final E removed)

private void
insertUpdate(int pos)

public void
nextAdd(int from, int to)

public void
nextPermutation(int from, int to, int[] perm)

public void
nextRemove(int idx, E removed)

public void
nextRemove(int idx, List<? extends E> removed)

public void
nextReplace(int from, int to, List<? extends E> removed)

public void
nextSet(int idx, E old)

public void
nextUpdate(int idx)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

addRemoveChangesback to summary
private List<ListChangeBuilder.SubChange<E>> addRemoveChanges
changeLockback to summary
private int changeLock
EMPTY_PERMback to summary
private static final int[] EMPTY_PERM
listback to summary
private final ObservableListBase<E> list
permutationChangeback to summary
private ListChangeBuilder.SubChange<E> permutationChange
updateChangesback to summary
private List<ListChangeBuilder.SubChange<E>> updateChanges

Constructor Detail

ListChangeBuilderback to summary
pack-priv ListChangeBuilder(ObservableListBase<E> list)

Method Detail

beginChangeback to summary
public void beginChange()
checkAddRemoveListback to summary
private void checkAddRemoveList()
checkStateback to summary
private void checkState()
commitback to summary
private void commit()
compressback to summary
private int compress(List<ListChangeBuilder.SubChange<E>> list)
endChangeback to summary
public void endChange()
finalizeSubChangeback to summary
private static <E> ListChangeBuilder.SubChange<E> finalizeSubChange(final ListChangeBuilder.SubChange<E> c)
finalizeSubChangeArrayback to summary
private static <E> ListChangeBuilder.SubChange<E>[] finalizeSubChangeArray(final ListChangeBuilder.SubChange<E>[] changes)
findSubChangeback to summary
private int findSubChange(int idx, final List<ListChangeBuilder.SubChange<E>> list)
insertAddback to summary
private void insertAdd(int from, int to)
insertRemovedback to summary
private void insertRemoved(int pos, final E removed)
insertUpdateback to summary
private void insertUpdate(int pos)
nextAddback to summary
public void nextAdd(int from, int to)
nextPermutationback to summary
public void nextPermutation(int from, int to, int[] perm)
nextRemoveback to summary
public void nextRemove(int idx, E removed)
nextRemoveback to summary
public void nextRemove(int idx, List<? extends E> removed)
nextReplaceback to summary
public void nextReplace(int from, int to, List<? extends E> removed)
nextSetback to summary
public void nextSet(int idx, E old)
nextUpdateback to summary
public void nextUpdate(int idx)
javafx.collections back to summary

private Class ListChangeBuilder.IterableChange<E>

extends ListChangeListener.Change<E>
Class Inheritance

Field Summary

Modifier and TypeField and Description
private ListChangeBuilder.SubChange<E>[]
private int

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private void
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 List<E>
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
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:
getAddedSizegetAddedSubListgetListgetPermutationgetRemovedSizewasAddedwasPermutatedwasRemovedwasReplaced

Field Detail

changesback to summary
private ListChangeBuilder.SubChange<E>[] changes
cursorback to summary
private int cursor

Constructor Detail

IterableChangeback to summary
private IterableChange(ListChangeBuilder.SubChange<E>[] changes, ObservableList<E> list)

Method Detail

checkStateback to summary
private void checkState()
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.

Returns:int

a beginning (inclusive) of an interval related to the change

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.

Returns:int[]

empty array if this is not permutation or an integer array containing the permutation

Annotations
@Override
getRemovedback to summary
public List<E> 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.

Returns:List<E>

a list with all the removed elements

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.

Returns:int

an end (exclusive) of an interval related to the change

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.

Returns:boolean

true if switched to the next change, false if this is the last 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.

Returns:String

a string representation of the object

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.

Returns:boolean

true if the current change is an update change

Annotations
@Override
javafx.collections back to summary

private Class ListChangeBuilder.SingleChange<E>

extends ListChangeListener.Change<E>
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final ListChangeBuilder.SubChange<E>
private boolean

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private void
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 List<E>
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
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:
getAddedSizegetAddedSubListgetListgetPermutationgetRemovedSizewasAddedwasPermutatedwasRemovedwasReplaced

Field Detail

changeback to summary
private final ListChangeBuilder.SubChange<E> change
onChangeback to summary
private boolean onChange

Constructor Detail

SingleChangeback to summary
public SingleChange(ListChangeBuilder.SubChange<E> change, ObservableListBase<E> list)

Method Detail

checkStateback to summary
private void checkState()
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.

Returns:int

a beginning (inclusive) of an interval related to the change

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.

Returns:int[]

empty array if this is not permutation or an integer array containing the permutation

Annotations
@Override
getRemovedback to summary
public List<E> 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.

Returns:List<E>

a list with all the removed elements

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.

Returns:int

an end (exclusive) of an interval related to the change

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.

Returns:boolean

true if switched to the next change, false if this is the last 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.

Returns:String

a string representation of the object

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.

Returns:boolean

true if the current change is an update change

Annotations
@Override
javafx.collections back to summary

private Class ListChangeBuilder.SubChange<E>

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv int
pack-priv int[]
pack-priv List<E>
pack-priv int
pack-priv boolean

Constructor Summary

AccessConstructor and Description
public
SubChange(int from, int to, List<E> removed, int[] perm, boolean updated)

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

fromback to summary
pack-priv int from
permback to summary
pack-priv int[] perm
removedback to summary
pack-priv List<E> removed
toback to summary
pack-priv int to
updatedback to summary
pack-priv boolean updated

Constructor Detail

SubChangeback to summary
public SubChange(int from, int to, List<E> removed, int[] perm, boolean updated)