Interface ObservablePatternMatchCollection<M extends IPatternMatch>
-
public interface ObservablePatternMatchCollection<M extends IPatternMatch>
Internal interface for building observable pattern match collections. The interface is implemented internally by bothObservablePatternMatchList
andObservablePatternMatchSet
so theObservablePatternMatchCollectionBuilder
can work with both lists and sets.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
createRuleSpecification(IQuerySpecification<? extends ViatraQueryMatcher<M>> querySpecification)
Creates the rule specification of the observable collection using a query specification.void
createRuleSpecification(ViatraQueryMatcher<M> matcher)
Creates the rule specification of the observable collection using an existing matcher.void
createUpdater(java.util.function.Function<M,? extends java.lang.Object> converter, java.util.Comparator<M> comparator)
The updater is used for transforming match set changes to observable diffs.void
initialize(ViatraQueryEngine engine)
Initializes the configured observable collection using a VIATRA Query engine.void
initialize(RuleEngine engine)
Initializes the configured observable collection using an rule engine.void
setFilter(EventFilter<M> filter)
Sets the filter used by the observable collection.
-
-
-
Method Detail
-
createUpdater
void createUpdater(java.util.function.Function<M,? extends java.lang.Object> converter, java.util.Comparator<M> comparator)
The updater is used for transforming match set changes to observable diffs.- Parameters:
converter
- used to transform matches to other type of objectscomparator
- used to order the content of lists- Since:
- 2.0
-
createRuleSpecification
void createRuleSpecification(IQuerySpecification<? extends ViatraQueryMatcher<M>> querySpecification)
Creates the rule specification of the observable collection using a query specification.- Parameters:
querySpecification
-
-
createRuleSpecification
void createRuleSpecification(ViatraQueryMatcher<M> matcher)
Creates the rule specification of the observable collection using an existing matcher.- Parameters:
matcher
-
-
setFilter
void setFilter(EventFilter<M> filter)
Sets the filter used by the observable collection.- Parameters:
filter
-
-
initialize
void initialize(ViatraQueryEngine engine)
Initializes the configured observable collection using a VIATRA Query engine.- Parameters:
engine
-
-
initialize
void initialize(RuleEngine engine)
Initializes the configured observable collection using an rule engine.- Parameters:
engine
-
-
-