Package org.eclipse.gef.common.collections

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

Enclosing class:
  ListListenerHelperEx<E>

public static class ListListenerHelperEx.AtomicChange<E> extends javafx.collections.ListChangeListener.Change<E>
A simple implementation of an `ListChangeListener.Change`.

## Constructor Summary

Constructors
Constructor
Description
`AtomicChange(javafx.collections.ObservableList<E> source, List<E> previousContents, List<ListListenerHelperEx.ElementarySubChange<E>> elementarySubChanges)`
Creates a new `ListListenerHelperEx.AtomicChange` that represents a change comprising multiple elementary sub-changesO.
`AtomicChange(javafx.collections.ObservableList<E> source, List<E> previousContents, ListListenerHelperEx.ElementarySubChange<E> elementarySubChange)`
Creates a new `ListListenerHelperEx.AtomicChange` that represents a change comprising a single elementary sub-change.
`AtomicChange(javafx.collections.ObservableList<E> source, javafx.collections.ListChangeListener.Change<? extends E> change)`
Creates a new `ListListenerHelperEx.AtomicChange` for the passed in source, based on the data provided in the passed-in change.

## Method Summary

Modifier and Type
Method
Description
`int`
`getAddedSize()`
`List<E>`
`getAddedSubList()`
`int`
`getFrom()`
`int[]`
`getPermutation()`
`int`
`getPermutation(int i)`
`List<E>`
`getPreviousContents()`
Returns the previous contents of the observable list before the change was applied.
`List<E>`
`getRemoved()`
`int`
`getRemovedSize()`
`int`
`getTo()`
`boolean`
`next()`
`void`
`reset()`
`String`
`toString()`
`boolean`
`wasAdded()`
`boolean`
`wasPermutated()`
`boolean`
`wasRemoved()`
`boolean`
`wasReplaced()`
`boolean`
`wasUpdated()`

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

`getList`

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

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

## Constructor Details

### AtomicChange

public AtomicChange(javafx.collections.ObservableList<E> source, List<E> previousContents, ListListenerHelperEx.ElementarySubChange<E> elementarySubChange)
Creates a new `ListListenerHelperEx.AtomicChange` that represents a change comprising a single elementary sub-change.

Parameters:
  `source` - The source `ObservableList` from which the change originated.
  `previousContents` - The previous contents of the `ObservableList` before the change was applied.
  `elementarySubChange` - The elementary sub-change that has been applied.

### AtomicChange

public AtomicChange(javafx.collections.ObservableList<E> source, List<E> previousContents, List<ListListenerHelperEx.ElementarySubChange<E>> elementarySubChanges)
Creates a new `ListListenerHelperEx.AtomicChange` that represents a change comprising multiple elementary sub-changesO.

Parameters:
  `source` - The source `ObservableList` from which the change originated.
  `previousContents` - The previous contents of the `ObservableList` before 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 new `ListListenerHelperEx.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 `ObservableList` to re-fire change events of their wrapped `ObservableList` with themselves as source.

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

### getAddedSize

public int getAddedSize()

Overrides:
  `getAddedSize` in class `javafx.collections.ListChangeListener.Change<E>`

### getAddedSubList

public List<E> getAddedSubList()

Overrides:
  `getAddedSubList` in class `javafx.collections.ListChangeListener.Change<E>`

### getFrom

public int getFrom()

Specified by:
  `getFrom` in class `javafx.collections.ListChangeListener.Change<E>`

### getPermutation

public int[] getPermutation()

Specified by:
  `getPermutation` in class `javafx.collections.ListChangeListener.Change<E>`

### getPermutation

public int getPermutation(int i)

Overrides:
  `getPermutation` in class `javafx.collections.ListChangeListener.Change<E>`

### getPreviousContents

public 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 List<E> getRemoved()

Specified by:
  `getRemoved` in class `javafx.collections.ListChangeListener.Change<E>`

### getRemovedSize

public int getRemovedSize()

Overrides:
  `getRemovedSize` in class `javafx.collections.ListChangeListener.Change<E>`

### getTo

public int getTo()

Specified by:
  `getTo` in class `javafx.collections.ListChangeListener.Change<E>`

### next

public boolean next()

Specified by:
  `next` in class `javafx.collections.ListChangeListener.Change<E>`

### reset

public void reset()

Specified by:
  `reset` in class `javafx.collections.ListChangeListener.Change<E>`

### toString

public String toString()

Overrides:
  `toString` in class `Object`

### wasAdded

public boolean wasAdded()

Overrides:
  `wasAdded` in class `javafx.collections.ListChangeListener.Change<E>`

### wasPermutated

public boolean wasPermutated()

Overrides:
  `wasPermutated` in class `javafx.collections.ListChangeListener.Change<E>`

### wasRemoved

public boolean wasRemoved()

Overrides:
  `wasRemoved` in class `javafx.collections.ListChangeListener.Change<E>`

### wasReplaced

public boolean wasReplaced()

Overrides:
  `wasReplaced` in class `javafx.collections.ListChangeListener.Change<E>`

### wasUpdated

public boolean wasUpdated()

Overrides:
  `wasUpdated` in class `javafx.collections.ListChangeListener.Change<E>`