Class ListListenerHelperEx.AtomicChange<E>
- java.lang.Object
-
- javafx.collections.ListChangeListener.Change<E>
-
- org.eclipse.gef.common.collections.ListListenerHelperEx.AtomicChange<E>
-
- Type Parameters:
E- The element type of the sourceObservableList.
- Enclosing class:
- ListListenerHelperEx<E>
public static class ListListenerHelperEx.AtomicChange<E> extends javafx.collections.ListChangeListener.Change<E>A simple implementation of anListChangeListener.Change.
-
-
Constructor Summary
Constructors Constructor Description AtomicChange(javafx.collections.ObservableList<E> source, java.util.List<E> previousContents, java.util.List<ListListenerHelperEx.ElementarySubChange<E>> elementarySubChanges)Creates a newListListenerHelperEx.AtomicChangethat represents a change comprising multiple elementary sub-changesO.AtomicChange(javafx.collections.ObservableList<E> source, java.util.List<E> previousContents, ListListenerHelperEx.ElementarySubChange<E> elementarySubChange)Creates a newListListenerHelperEx.AtomicChangethat represents a change comprising a single elementary sub-change.AtomicChange(javafx.collections.ObservableList<E> source, javafx.collections.ListChangeListener.Change<? extends E> change)Creates a newListListenerHelperEx.AtomicChangefor the passed in source, based on the data provided in the passed-in change.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetAddedSize()java.util.List<E>getAddedSubList()intgetFrom()int[]getPermutation()intgetPermutation(int i)java.util.List<E>getPreviousContents()Returns the previous contents of the observable list before the change was applied.java.util.List<E>getRemoved()intgetRemovedSize()intgetTo()booleannext()voidreset()java.lang.StringtoString()booleanwasAdded()booleanwasPermutated()booleanwasRemoved()booleanwasReplaced()booleanwasUpdated()
-
-
-
Constructor Detail
-
AtomicChange
public AtomicChange(javafx.collections.ObservableList<E> source, java.util.List<E> previousContents, ListListenerHelperEx.ElementarySubChange<E> elementarySubChange)
Creates a newListListenerHelperEx.AtomicChangethat represents a change comprising a single elementary sub-change.- Parameters:
source- The sourceObservableListfrom which the change originated.previousContents- The previous contents of theObservableListbefore the change was applied.elementarySubChange- The elementary sub-change that has been applied.
-
AtomicChange
public AtomicChange(javafx.collections.ObservableList<E> source, java.util.List<E> previousContents, java.util.List<ListListenerHelperEx.ElementarySubChange<E>> elementarySubChanges)
Creates a newListListenerHelperEx.AtomicChangethat represents a change comprising multiple elementary sub-changesO.- Parameters:
source- The sourceObservableListfrom which the change originated.previousContents- The previous contents of theObservableListbefore the change was applied.elementarySubChanges- The elementary sub-changes that have been applied as part of this change.
-
AtomicChange
public AtomicChange(javafx.collections.ObservableList<E> source, javafx.collections.ListChangeListener.Change<? extends E> change)
Creates a newListListenerHelperEx.AtomicChangefor the passed in source, based on the data provided in the passed-in change.This is basically used to allow properties wrapping an
ObservableListto re-fire change events of their wrappedObservableListwith themselves as source.- Parameters:
source- The new sourceObservableList.change- The change to infer a new change from. It is expected that the change is in initial state. In either case it will be reset to initial state.
-
-
Method Detail
-
getAddedSize
public int getAddedSize()
- Overrides:
getAddedSizein classjavafx.collections.ListChangeListener.Change<E>
-
getAddedSubList
public java.util.List<E> getAddedSubList()
- Overrides:
getAddedSubListin classjavafx.collections.ListChangeListener.Change<E>
-
getFrom
public int getFrom()
- Specified by:
getFromin classjavafx.collections.ListChangeListener.Change<E>
-
getPermutation
public int[] getPermutation()
- Specified by:
getPermutationin classjavafx.collections.ListChangeListener.Change<E>
-
getPermutation
public int getPermutation(int i)
- Overrides:
getPermutationin classjavafx.collections.ListChangeListener.Change<E>
-
getPreviousContents
public java.util.List<E> getPreviousContents()
Returns the previous contents of the observable list before the change was applied.- Returns:
- An unmodifiable list containing the previous contents of the list.
-
getRemoved
public java.util.List<E> getRemoved()
- Specified by:
getRemovedin classjavafx.collections.ListChangeListener.Change<E>
-
getRemovedSize
public int getRemovedSize()
- Overrides:
getRemovedSizein classjavafx.collections.ListChangeListener.Change<E>
-
getTo
public int getTo()
- Specified by:
getToin classjavafx.collections.ListChangeListener.Change<E>
-
next
public boolean next()
- Specified by:
nextin classjavafx.collections.ListChangeListener.Change<E>
-
reset
public void reset()
- Specified by:
resetin classjavafx.collections.ListChangeListener.Change<E>
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
wasAdded
public boolean wasAdded()
- Overrides:
wasAddedin classjavafx.collections.ListChangeListener.Change<E>
-
wasPermutated
public boolean wasPermutated()
- Overrides:
wasPermutatedin classjavafx.collections.ListChangeListener.Change<E>
-
wasRemoved
public boolean wasRemoved()
- Overrides:
wasRemovedin classjavafx.collections.ListChangeListener.Change<E>
-
wasReplaced
public boolean wasReplaced()
- Overrides:
wasReplacedin classjavafx.collections.ListChangeListener.Change<E>
-
wasUpdated
public boolean wasUpdated()
- Overrides:
wasUpdatedin classjavafx.collections.ListChangeListener.Change<E>
-
-