ptolemy.actor.gt
Class GraphMatcher.LookbackEntry

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.AbstractSequentialList<E>
              extended by java.util.LinkedList<E>
                  extended by ptolemy.actor.gt.data.Tuple<java.lang.Object>
                      extended by ptolemy.actor.gt.GraphMatcher.LookbackEntry
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<java.lang.Object>, java.util.Collection<java.lang.Object>, java.util.List<java.lang.Object>, java.util.Queue<java.lang.Object>
Enclosing class:
GraphMatcher

private static class GraphMatcher.LookbackEntry
extends Tuple<java.lang.Object>

An entry for a lookback item. When pattern matching reaches an end of the graph, it looks back and try to match all the objects discovered along the way that have not been considered in the matching yet.


Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
GraphMatcher.LookbackEntry(GraphMatcher.ObjectList patternList, GraphMatcher.ObjectList hostList)
          Construct an unfinished lookback entry with the list of pattern objects and the list of host objects.
 
Method Summary
 GraphMatcher.ObjectList getHostList()
          Get the list containing objects in the host model.
 GraphMatcher.ObjectList getPatternList()
          Get the list containing objects in the pattern.
 boolean isFinished()
          Return whether matching for the objects in the two lists in this entry has successfully finished.
 boolean isNegated()
          Return whether the objects in the lists should be negated in the matching.
 void setFinished(boolean finished)
          Mark this lookback entry to be finished.
 void setNegated(boolean negated)
          Mark that the objects in the lists should be negated.
 
Methods inherited from class java.util.LinkedList
add, add, addAll, addAll, addFirst, addLast, clear, clone, contains, element, get, getFirst, getLast, indexOf, lastIndexOf, listIterator, offer, peek, poll, remove, remove, remove, removeFirst, removeLast, set, size, toArray, toArray
 
Methods inherited from class java.util.AbstractSequentialList
iterator
 
Methods inherited from class java.util.AbstractList
equals, hashCode, listIterator, removeRange, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, isEmpty, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, isEmpty, iterator, listIterator, removeAll, retainAll, subList
 

Constructor Detail

GraphMatcher.LookbackEntry

GraphMatcher.LookbackEntry(GraphMatcher.ObjectList patternList,
                           GraphMatcher.ObjectList hostList)
Construct an unfinished lookback entry with the list of pattern objects and the list of host objects.

Parameters:
patternList - The list of pattern objects.
hostList - The list of host objects.
Method Detail

getHostList

public GraphMatcher.ObjectList getHostList()
Get the list containing objects in the host model.

Returns:
The list containing objects in the host model.

getPatternList

public GraphMatcher.ObjectList getPatternList()
Get the list containing objects in the pattern.

Returns:
The list containing objects in the pattern.

isFinished

public boolean isFinished()
Return whether matching for the objects in the two lists in this entry has successfully finished.

Returns:
true if the match is successful.

isNegated

public boolean isNegated()
Return whether the objects in the lists should be negated in the matching.

Returns:
true if the objects should be negated.

setFinished

public void setFinished(boolean finished)
Mark this lookback entry to be finished.

Parameters:
finished - Whether this lookback entry is finished.

setNegated

public void setNegated(boolean negated)
Mark that the objects in the lists should be negated.

Parameters:
negated - Whether the objects should be negated.