public class ObservablePatternMatchSet.SetCollectionUpdate extends java.lang.Object implements IObservablePatternMatchCollectionUpdate<Match>
Modifier and Type | Field and Description |
---|---|
protected com.google.common.base.Function<Match,?> |
converter |
protected java.util.Map<Match,java.lang.Object> |
matchToItem |
Constructor and Description |
---|
SetCollectionUpdate(com.google.common.base.Function<Match,?> converter) |
Modifier and Type | Method and 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.
|
protected final com.google.common.base.Function<Match extends IPatternMatch,?> converter
protected final java.util.Map<Match extends IPatternMatch,java.lang.Object> matchToItem
public SetCollectionUpdate(com.google.common.base.Function<Match,?> converter)
public void addMatch(Match match)
IObservablePatternMatchCollectionUpdate
addMatch
in interface IObservablePatternMatchCollectionUpdate<Match extends IPatternMatch>
match
- the new matchpublic void removeMatch(Match match)
IObservablePatternMatchCollectionUpdate
removeMatch
in interface IObservablePatternMatchCollectionUpdate<Match extends IPatternMatch>
match
- the disappered matchpublic void clear()
IObservablePatternMatchCollectionUpdate
clear
in interface IObservablePatternMatchCollectionUpdate<Match extends IPatternMatch>