Package org.eclipse.gef.common.collections

# 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 source `ObservableSet`.

Enclosing class:
  SetListenerHelperEx<E>

public static class SetListenerHelperEx.AtomicChange<E> extends SetChangeListener.Change<E>
A simple implementation of an `SetChangeListener.Change`.

## Constructor Summary

Constructors
Constructor
Description
`AtomicChange(ObservableSet<E> source, E removedElement, E addedElement)`
Creates a new `SetListenerHelperEx.AtomicChange` that represents a change comprising a single elementary sub-change.
`AtomicChange(ObservableSet<E> source, SetChangeListener.Change<? extends E> change)`
Creates a new `SetListenerHelperEx.AtomicChange` for the passed in source, based on the data provided in the passed-in change.

## Method Summary

Modifier and Type
Method
Description
`E`
`getElementAdded()`
`E`
`getElementRemoved()`
`String`
`toString()`
`boolean`
`wasAdded()`
`boolean`
`wasRemoved()`

### Methods inherited from class javafx.collections.SetChangeListener.Change

`getSet`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Constructor Details

### AtomicChange

public AtomicChange(ObservableSet<E> source, E removedElement, E addedElement)
Creates a new `SetListenerHelperEx.AtomicChange` that represents a change comprising a single elementary sub-change.

Parameters:
  `source` - The source `ObservableSet` from which the change originated.
  `removedElement` - The element that was removed by this change or `null` if no value was removed.
  `addedElement` - The element that was added by this change or `null` if no value was added.

### AtomicChange

public AtomicChange(ObservableSet<E> source, SetChangeListener.Change<? extends E> change)
Creates a new `SetListenerHelperEx.AtomicChange` for the passed in source, based on the data provided in the passed-in change.

This is basically used to allow properties wrapping an `ObservableSet` to re-fire change events of their wrapped `ObservableSet` with themselves as source.

Parameters:
  `source` - The new source `ObservableSet`.
  `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 Details

### getElementAdded

public E getElementAdded()

Specified by:
  `getElementAdded` in class `SetChangeListener.Change<E>`

### getElementRemoved

public E getElementRemoved()

Specified by:
  `getElementRemoved` in class `SetChangeListener.Change<E>`

### toString

public String toString()

Overrides:
  `toString` in class `Object`

### wasAdded

public boolean wasAdded()

Specified by:
  `wasAdded` in class `SetChangeListener.Change<E>`

### wasRemoved

public boolean wasRemoved()

Specified by:
  `wasRemoved` in class `SetChangeListener.Change<E>`