Class ObservableCollectionHelper
- java.lang.Object
-
- org.eclipse.viatra.addon.databinding.runtime.collection.ObservableCollectionHelper
-
public final class ObservableCollectionHelper extends java.lang.Object
Utility class to prepare a rule in an agenda for an observable collection. For use cases, seeObservablePatternMatchSet
andObservablePatternMatchList
.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static <Match extends IPatternMatch,Matcher extends ViatraQueryMatcher<Match>>
RuleSpecification<Match>createRuleSpecification(IObservablePatternMatchCollectionUpdate<Match> observableCollectionUpdate, Matcher matcher)
Creates the rule used for updating the results.protected static <Match extends IPatternMatch,Matcher extends ViatraQueryMatcher<Match>>
RuleSpecification<Match>createRuleSpecification(IObservablePatternMatchCollectionUpdate<Match> observableCollectionUpdate, IQuerySpecification<Matcher> querySpecification)
Creates the rule used for updating the results.protected static <Match extends IPatternMatch,Matcher extends ViatraQueryMatcher<Match>>
RuleSpecification<Match>createUpdatingRuleSpecification(IObservablePatternMatchCollectionUpdate<Match> observableCollectionUpdate, IQuerySpecification<Matcher> querySpecification)
Creates the rule used for updating the results including changes in feature values.protected static void
disposeRuleEngine(RuleEngine ruleEngine)
protected static <Match extends IPatternMatch>
RuleEngineprepareRuleEngine(ViatraQueryEngine engine, RuleSpecification<Match> specification, EventFilter<Match> filter)
-
-
-
Method Detail
-
createRuleSpecification
protected static <Match extends IPatternMatch,Matcher extends ViatraQueryMatcher<Match>> RuleSpecification<Match> createRuleSpecification(IObservablePatternMatchCollectionUpdate<Match> observableCollectionUpdate, IQuerySpecification<Matcher> querySpecification)
Creates the rule used for updating the results.- Parameters:
observableCollectionUpdate
- the observable collection to handlequerySpecification
- theIQuerySpecification
used to create the rule
-
createUpdatingRuleSpecification
protected static <Match extends IPatternMatch,Matcher extends ViatraQueryMatcher<Match>> RuleSpecification<Match> createUpdatingRuleSpecification(IObservablePatternMatchCollectionUpdate<Match> observableCollectionUpdate, IQuerySpecification<Matcher> querySpecification)
Creates the rule used for updating the results including changes in feature values.- Parameters:
observableCollectionUpdate
- the observable collection to handlequerySpecification
- theIQuerySpecification
used to create the rule
-
createRuleSpecification
protected static <Match extends IPatternMatch,Matcher extends ViatraQueryMatcher<Match>> RuleSpecification<Match> createRuleSpecification(IObservablePatternMatchCollectionUpdate<Match> observableCollectionUpdate, Matcher matcher)
Creates the rule used for updating the results.- Parameters:
observableCollectionUpdate
- the observable collection to handlematcher
- theViatraQueryMatcher
used to create the rule
-
prepareRuleEngine
protected static <Match extends IPatternMatch> RuleEngine prepareRuleEngine(ViatraQueryEngine engine, RuleSpecification<Match> specification, EventFilter<Match> filter)
-
disposeRuleEngine
protected static void disposeRuleEngine(RuleEngine ruleEngine)
-
-