public class ObservablePatternMatchCollectionBuilder<M extends org.eclipse.viatra.query.runtime.api.IPatternMatch>
extends java.lang.Object
create(org.eclipse.viatra.query.runtime.api.IQuerySpecification<? extends org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher<M>>)
methods to initialize a builder with a given matcher or query
specification.
setEngine(org.eclipse.viatra.query.runtime.api.ViatraQueryEngine)
,setFilter(org.eclipse.viatra.transformation.evm.api.event.EventFilter<M>)
, setComparator(java.util.Comparator<M>)
, setConverter(com.google.common.base.Function<M, ?>)
)
to configure the builder.
buildList()
and buildSet()
methods to create an observable
list or set as required.
Modifier and Type | Method and Description |
---|---|
ObservablePatternMatchList<M> |
buildList()
Builds an
ObservablePatternMatchList based on the configuration set in the builder. |
ObservablePatternMatchSet<M> |
buildSet()
Builds an
ObservablePatternMatchSet based on the configuration set in the builder. |
static <M extends org.eclipse.viatra.query.runtime.api.IPatternMatch> |
create(org.eclipse.viatra.query.runtime.api.IQuerySpecification<? extends org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher<M>> specification)
Creates a builder for configuring an observable collection
observing the match set of the given
IQuerySpecification |
static <M extends org.eclipse.viatra.query.runtime.api.IPatternMatch> |
create(org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher<M> matcher)
Creates a builder for configuring an observable collection
observing the match set of the given
ViatraQueryMatcher . |
ObservablePatternMatchCollectionBuilder<M> |
setComparator(java.util.Comparator<M> comparator)
The given comparator is used to define the ordering between the elements in the built observable.
|
ObservablePatternMatchCollectionBuilder<M> |
setConverter(com.google.common.base.Function<M,?> converter)
The given converter function is used on each match and the end result is put into the
observable collection.
|
ObservablePatternMatchCollectionBuilder<M> |
setEngine(org.eclipse.viatra.transformation.evm.api.RuleEngine engine)
Sets the given
RuleEngine to be used as the engine of the built observable. |
ObservablePatternMatchCollectionBuilder<M> |
setEngine(org.eclipse.viatra.query.runtime.api.ViatraQueryEngine engine)
Sets the given
ViatraQueryEngine to be used as the engine of the built observable. |
ObservablePatternMatchCollectionBuilder<M> |
setFilter(java.util.Collection<M> multifilters,
org.eclipse.viatra.transformation.evm.specific.event.ViatraQueryFilterSemantics semantics)
Sets the given collection of (partial) matches as an event filter with the given semantics
used by the built observable collection.
|
ObservablePatternMatchCollectionBuilder<M> |
setFilter(org.eclipse.viatra.transformation.evm.api.event.EventFilter<M> filter)
Sets the event filter used by the built observable collection.
|
ObservablePatternMatchCollectionBuilder<M> |
setFilter(M filter)
Sets the given (partial) match as an event filter used by the built observable collection.
|
public static <M extends org.eclipse.viatra.query.runtime.api.IPatternMatch> ObservablePatternMatchCollectionBuilder<M> create(org.eclipse.viatra.query.runtime.api.IQuerySpecification<? extends org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher<M>> specification)
IQuerySpecification
specification
- the IQuerySpecification
used to create a matcherpublic static <M extends org.eclipse.viatra.query.runtime.api.IPatternMatch> ObservablePatternMatchCollectionBuilder<M> create(org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher<M> matcher)
ViatraQueryMatcher
.matcher
- the ViatraQueryMatcher
to use as the source of the observable collectionpublic ObservablePatternMatchCollectionBuilder<M> setFilter(org.eclipse.viatra.transformation.evm.api.event.EventFilter<M> filter)
public ObservablePatternMatchCollectionBuilder<M> setFilter(M filter)
public ObservablePatternMatchCollectionBuilder<M> setFilter(java.util.Collection<M> multifilters, org.eclipse.viatra.transformation.evm.specific.event.ViatraQueryFilterSemantics semantics)
public ObservablePatternMatchCollectionBuilder<M> setEngine(org.eclipse.viatra.query.runtime.api.ViatraQueryEngine engine)
ViatraQueryEngine
to be used as the engine of the built observable.public ObservablePatternMatchCollectionBuilder<M> setEngine(org.eclipse.viatra.transformation.evm.api.RuleEngine engine)
RuleEngine
to be used as the engine of the built observable.public ObservablePatternMatchCollectionBuilder<M> setComparator(java.util.Comparator<M> comparator)
public ObservablePatternMatchCollectionBuilder<M> setConverter(com.google.common.base.Function<M,?> converter)
public ObservablePatternMatchList<M> buildList()
ObservablePatternMatchList
based on the configuration set in the builder.public ObservablePatternMatchSet<M> buildSet()
ObservablePatternMatchSet
based on the configuration set in the builder.