Class ObservablePatternMatchList<Match extends IPatternMatch>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- org.eclipse.core.databinding.observable.list.AbstractObservableList
-
- org.eclipse.viatra.addon.databinding.runtime.collection.ObservablePatternMatchList<Match>
-
- All Implemented Interfaces:
java.lang.Iterable,java.util.Collection,java.util.List,org.eclipse.core.databinding.observable.IObservable,org.eclipse.core.databinding.observable.IObservableCollection,org.eclipse.core.databinding.observable.list.IObservableList
public class ObservablePatternMatchList<Match extends IPatternMatch> extends org.eclipse.core.databinding.observable.list.AbstractObservableListObservable view of a match set for a givenViatraQueryMatcheron a model (match sets of anViatraQueryMatcherare ordered by the order of their appearance).For creating complex observable lists, use
ObservablePatternMatchCollectionBuilder.This implementation uses the
ExecutionSchemato get notifications for match set changes, and can be instantiated using either an existingViatraQueryMatcher, or anIQuerySpecificationand either aViatraQueryEngineorExecutionSchema.Note that a converter can be used for the list, in which case the type of list items may be different from the generic type parameter Match.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classObservablePatternMatchList.ListCollectionUpdate
-
Constructor Summary
Constructors Modifier Constructor Description protectedObservablePatternMatchList()Creates an observable list, that will be built be theObservablePatternMatchCollectionBuilderusing theObservablePatternMatchCollectioninterface.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()voiddispose()protected intdoGetSize()java.lang.Objectget(int index)java.lang.ObjectgetElementType()protected ObservablePatternMatchCollection<Match>getInternalCollection()RuleSpecification<Match>getSpecification()java.util.Iteratoriterator()voidsetFilter(Match filter)Update the filter used by the observable during runtime.-
Methods inherited from class org.eclipse.core.databinding.observable.list.AbstractObservableList
add, addAll, addAll, addChangeListener, addDisposeListener, addListChangeListener, addStaleListener, checkRealm, contains, containsAll, equals, fireChange, fireListChange, fireStale, firstListenerAdded, getRealm, hashCode, hasListeners, indexOf, isDisposed, isEmpty, isStale, lastIndexOf, lastListenerRemoved, move, remove, removeAll, removeChangeListener, removeDisposeListener, removeListChangeListener, removeStaleListener, retainAll, size, toArray, toArray
-
Methods inherited from class java.util.AbstractList
add, listIterator, listIterator, remove, removeRange, set, subList
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Constructor Detail
-
ObservablePatternMatchList
protected ObservablePatternMatchList()
Creates an observable list, that will be built be theObservablePatternMatchCollectionBuilderusing theObservablePatternMatchCollectioninterface.
-
-
Method Detail
-
getInternalCollection
protected ObservablePatternMatchCollection<Match> getInternalCollection()
-
clear
public void clear()
- Specified by:
clearin interfacejava.util.Collection<Match extends IPatternMatch>- Specified by:
clearin interfacejava.util.List<Match extends IPatternMatch>- Overrides:
clearin classjava.util.AbstractList
-
dispose
public void dispose()
- Specified by:
disposein interfaceorg.eclipse.core.databinding.observable.IObservable- Overrides:
disposein classorg.eclipse.core.databinding.observable.list.AbstractObservableList
-
getElementType
public java.lang.Object getElementType()
-
doGetSize
protected int doGetSize()
- Specified by:
doGetSizein classorg.eclipse.core.databinding.observable.list.AbstractObservableList
-
get
public java.lang.Object get(int index)
- Specified by:
getin interfaceorg.eclipse.core.databinding.observable.list.IObservableList<Match extends IPatternMatch>- Specified by:
getin interfacejava.util.List<Match extends IPatternMatch>- Specified by:
getin classjava.util.AbstractList
-
iterator
public java.util.Iterator iterator()
- Specified by:
iteratorin interfacejava.util.Collection<Match extends IPatternMatch>- Specified by:
iteratorin interfaceorg.eclipse.core.databinding.observable.list.IObservableList<Match extends IPatternMatch>- Specified by:
iteratorin interfacejava.lang.Iterable<Match extends IPatternMatch>- Specified by:
iteratorin interfacejava.util.List<Match extends IPatternMatch>- Overrides:
iteratorin classorg.eclipse.core.databinding.observable.list.AbstractObservableList
-
getSpecification
public RuleSpecification<Match> getSpecification()
- Returns:
- the specification
-
setFilter
public void setFilter(Match filter)
Update the filter used by the observable during runtime. The contents of the observable are updated and the diff is sent to observers.- Parameters:
filter-
-
-