Class ObservablePatternMatchList<Match extends IPatternMatch>

  • 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.AbstractObservableList
    Observable view of a match set for a given ViatraQueryMatcher on a model (match sets of an ViatraQueryMatcher are ordered by the order of their appearance).

    For creating complex observable lists, use ObservablePatternMatchCollectionBuilder.

    This implementation uses the ExecutionSchema to get notifications for match set changes, and can be instantiated using either an existing ViatraQueryMatcher, or an IQuerySpecification and either a ViatraQueryEngine or ExecutionSchema.

    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.

    • Field Summary

      • Fields inherited from class java.util.AbstractList

        modCount
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clear()  
      void dispose()  
      protected int doGetSize()  
      java.lang.Object get​(int index)  
      java.lang.Object getElementType()  
      protected ObservablePatternMatchCollection<Match> getInternalCollection()  
      RuleSpecification<Match> getSpecification()  
      java.util.Iterator iterator()  
      void setFilter​(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.util.AbstractCollection

        toString
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Collection

        parallelStream, removeIf, stream, toArray
      • Methods inherited from interface org.eclipse.core.databinding.observable.list.IObservableList

        listIterator, listIterator, remove, set, subList
      • Methods inherited from interface java.lang.Iterable

        forEach
      • Methods inherited from interface java.util.List

        add, replaceAll, sort, spliterator
    • Method Detail

      • clear

        public void clear()
        Specified by:
        clear in interface java.util.Collection<Match extends IPatternMatch>
        Specified by:
        clear in interface java.util.List<Match extends IPatternMatch>
        Overrides:
        clear in class java.util.AbstractList
      • dispose

        public void dispose()
        Specified by:
        dispose in interface org.eclipse.core.databinding.observable.IObservable
        Overrides:
        dispose in class org.eclipse.core.databinding.observable.list.AbstractObservableList
      • getElementType

        public java.lang.Object getElementType()
      • doGetSize

        protected int doGetSize()
        Specified by:
        doGetSize in class org.eclipse.core.databinding.observable.list.AbstractObservableList
      • get

        public java.lang.Object get​(int index)
        Specified by:
        get in interface org.eclipse.core.databinding.observable.list.IObservableList<Match extends IPatternMatch>
        Specified by:
        get in interface java.util.List<Match extends IPatternMatch>
        Specified by:
        get in class java.util.AbstractList
      • iterator

        public java.util.Iterator iterator()
        Specified by:
        iterator in interface java.util.Collection<Match extends IPatternMatch>
        Specified by:
        iterator in interface org.eclipse.core.databinding.observable.list.IObservableList<Match extends IPatternMatch>
        Specified by:
        iterator in interface java.lang.Iterable<Match extends IPatternMatch>
        Specified by:
        iterator in interface java.util.List<Match extends IPatternMatch>
        Overrides:
        iterator in class org.eclipse.core.databinding.observable.list.AbstractObservableList
      • 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 -