Class SetListenerHelperEx.AtomicChange<E>
- java.lang.Object
-
- javafx.collections.SetChangeListener.Change<E>
-
- org.eclipse.gef.common.collections.SetListenerHelperEx.AtomicChange<E>
-
- Type Parameters:
E- The element type of the sourceObservableSet.
- Enclosing class:
- SetListenerHelperEx<E>
public static class SetListenerHelperEx.AtomicChange<E> extends javafx.collections.SetChangeListener.Change<E>A simple implementation of anSetChangeListener.Change.
-
-
Constructor Summary
Constructors Constructor Description AtomicChange(javafx.collections.ObservableSet<E> source, E removedElement, E addedElement)Creates a newSetListenerHelperEx.AtomicChangethat represents a change comprising a single elementary sub-change.AtomicChange(javafx.collections.ObservableSet<E> source, javafx.collections.SetChangeListener.Change<? extends E> change)Creates a newSetListenerHelperEx.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 EgetElementAdded()EgetElementRemoved()java.lang.StringtoString()booleanwasAdded()booleanwasRemoved()
-
-
-
Constructor Detail
-
AtomicChange
public AtomicChange(javafx.collections.ObservableSet<E> source, E removedElement, E addedElement)
Creates a newSetListenerHelperEx.AtomicChangethat represents a change comprising a single elementary sub-change.- Parameters:
source- The sourceObservableSetfrom which the change originated.removedElement- The element that was removed by this change ornullif no value was removed.addedElement- The element that was added by this change ornullif no value was added.
-
AtomicChange
public AtomicChange(javafx.collections.ObservableSet<E> source, javafx.collections.SetChangeListener.Change<? extends E> change)
Creates a newSetListenerHelperEx.AtomicChangefor the passed in source, based on the data provided in the passed-in change.This is basically used to allow properties wrapping an
ObservableSetto re-fire change events of their wrappedObservableSetwith themselves as source.- Parameters:
source- The new sourceObservableSet.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
-
getElementAdded
public E getElementAdded()
- Specified by:
getElementAddedin classjavafx.collections.SetChangeListener.Change<E>
-
getElementRemoved
public E getElementRemoved()
- Specified by:
getElementRemovedin classjavafx.collections.SetChangeListener.Change<E>
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
wasAdded
public boolean wasAdded()
- Specified by:
wasAddedin classjavafx.collections.SetChangeListener.Change<E>
-
wasRemoved
public boolean wasRemoved()
- Specified by:
wasRemovedin classjavafx.collections.SetChangeListener.Change<E>
-
-