Package org.eclipse.gef.common.collections

# Class MultisetListenerHelper.ElementarySubChange<E>

java.lang.Object
org.eclipse.gef.common.collections.MultisetListenerHelper.ElementarySubChange<E>

Type Parameters:
  `E` - The element type of the `ObservableMultiset`.

Enclosing class:
  MultisetListenerHelper<E>

public static class MultisetListenerHelper.ElementarySubChange<E> extends Object
An elementary change related to a single element of a `Multiset`.

## Constructor Summary

Constructors
Constructor
Description
`ElementarySubChange(E element, int removeCount, int addCount)`
Constructs a new elementary sub-change with the given values.

## Method Summary

Modifier and Type
Method
Description
`int`
`getAddCount()`
Returns the number of occurrences that have been added for the respective element as part of this elementary sub-change.
`E`
`getElement()`
Returns the element that has been altered by this elementary sub-change.
`int`
`getRemoveCount()`
Returns the number of occurrences that have been removed for the respective element as part of this elementary sub-change.
`String`
`toString()`

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

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

## Constructor Details

### ElementarySubChange

public ElementarySubChange(E element, int removeCount, int addCount)
Constructs a new elementary sub-change with the given values.

Parameters:
  `element` - The element that was added or removed.
  `removeCount` - The number of occurrences that were removed.
  `addCount` - The number of occurrences that were added.

## Method Details

### getAddCount

public int getAddCount()
Returns the number of occurrences that have been added for the respective element as part of this elementary sub-change.

Returns:
  The number of added occurrences.

### getElement

public E getElement()
Returns the element that has been altered by this elementary sub-change.

Returns:
  The changed element.

### getRemoveCount

public int getRemoveCount()
Returns the number of occurrences that have been removed for the respective element as part of this elementary sub-change.

Returns:
  The number of removed occurrences.

### toString

public String toString()

Overrides:
  `toString` in class `Object`