Package org.eclipse.viatra.addon.databinding.runtime.collection

## Class ObservablePatternMatchList.ListCollectionUpdate

- java.lang.Object
- - org.eclipse.viatra.addon.databinding.runtime.collection.ObservablePatternMatchList.ListCollectionUpdate

- All Implemented Interfaces:
    `IObservablePatternMatchCollectionUpdate<Match>`
  Enclosing class:
    ObservablePatternMatchList<Match extends IPatternMatch>

      public class ObservablePatternMatchList.ListCollectionUpdate
      extends java.lang.Object
      implements IObservablePatternMatchCollectionUpdate<Match>

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected java.util.Comparator<Match>` | `comparator` |
    `protected java.util.function.Function<Match,​?>` | `converter` |
    `protected static java.lang.String` | `DATA_BINDING_REALM_MUST_NOT_BE_NULL` |
    `protected java.util.Map<Match,​java.lang.Object>` | `matchToItem` |
    `protected org.eclipse.core.databinding.observable.list.ListDiff` | `nextDiff` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ListCollectionUpdate​(java.util.function.Function<Match,​?> converter, java.util.Comparator<Match> comparator)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `addMatch​(Match match)` | Can be called to indicate that a match appeared and should be added to the collection.
    `void` | `clear()` | Called when the collection is cleared to clean up internal fields.
    `void` | `removeMatch​(Match match)` | Can be called to indicate that a match disappeared and should be removed from the collection.

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

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

- - ### Field Detail

    - #### DATA_BINDING_REALM_MUST_NOT_BE_NULL

          protected static final java.lang.String DATA_BINDING_REALM_MUST_NOT_BE_NULL

      See Also:
        Constant Field Values

    - #### converter

          protected final java.util.function.Function<Match extends IPatternMatch,​?> converter

    - #### comparator

          protected final java.util.Comparator<Match extends IPatternMatch> comparator

    - #### matchToItem

          protected final java.util.Map<Match extends IPatternMatch,​java.lang.Object> matchToItem

    - #### nextDiff

          protected org.eclipse.core.databinding.observable.list.ListDiff nextDiff

  - ### Constructor Detail

    - #### ListCollectionUpdate

          public ListCollectionUpdate​(java.util.function.Function<Match,​?> converter,
                                      java.util.Comparator<Match> comparator)

      Since:
        2.0

  - ### Method Detail

    - #### addMatch

          public void addMatch​(Match match)

      Description copied from interface: `IObservablePatternMatchCollectionUpdate`
      Can be called to indicate that a match appeared and should be added to the collection.
      Specified by:
        `addMatch` in interface `IObservablePatternMatchCollectionUpdate<Match extends IPatternMatch>`
      Parameters:
        `match` - the new match

    - #### removeMatch

          public void removeMatch​(Match match)

      Description copied from interface: `IObservablePatternMatchCollectionUpdate`
      Can be called to indicate that a match disappeared and should be removed from the collection.
      Specified by:
        `removeMatch` in interface `IObservablePatternMatchCollectionUpdate<Match extends IPatternMatch>`
      Parameters:
        `match` - the disappered match

    - #### clear

          public void clear()

      Description copied from interface: `IObservablePatternMatchCollectionUpdate`
      Called when the collection is cleared to clean up internal fields.
      Specified by:
        `clear` in interface `IObservablePatternMatchCollectionUpdate<Match extends IPatternMatch>`