Class ObservablePatternMatchSet.SetCollectionUpdate
- java.lang.Object
-
- org.eclipse.viatra.addon.databinding.runtime.collection.ObservablePatternMatchSet.SetCollectionUpdate
-
- All Implemented Interfaces:
IObservablePatternMatchCollectionUpdate<Match>
- Enclosing class:
- ObservablePatternMatchSet<Match extends IPatternMatch>
public class ObservablePatternMatchSet.SetCollectionUpdate extends java.lang.Object implements IObservablePatternMatchCollectionUpdate<Match>
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.function.Function<Match,?>
converter
protected java.util.Map<Match,java.lang.Object>
matchToItem
-
Constructor Summary
Constructors Constructor Description SetCollectionUpdate(java.util.function.Function<Match,?> converter)
-
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.
-
-
-
Field Detail
-
converter
protected final java.util.function.Function<Match extends IPatternMatch,?> converter
-
matchToItem
protected final java.util.Map<Match extends IPatternMatch,java.lang.Object> matchToItem
-
-
Constructor Detail
-
SetCollectionUpdate
public SetCollectionUpdate(java.util.function.Function<Match,?> converter)
- 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 interfaceIObservablePatternMatchCollectionUpdate<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 interfaceIObservablePatternMatchCollectionUpdate<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 interfaceIObservablePatternMatchCollectionUpdate<Match extends IPatternMatch>
-
-