net.sf.bddbddb
Class InferenceRule.DependenceNavigator

java.lang.Object
  extended by net.sf.bddbddb.InferenceRule.DependenceNavigator
All Implemented Interfaces:
jwutil.graphs.Navigator
Enclosing class:
InferenceRule

public static class InferenceRule.DependenceNavigator
extends java.lang.Object
implements jwutil.graphs.Navigator

A navigator that can navigate over rule dependencies. next() on a rule returns its head relation, and next() on a relation returns the rules that use that relation. Likewise, prev() on a rule returns its subgoal relations, and prev() on a relation returns the rules that define that relation. This class also allows you to remove edges/nodes from it.


Constructor Summary
InferenceRule.DependenceNavigator(java.util.Collection rules)
          Construct a new DependenceNavigator using the given collection of rules.
InferenceRule.DependenceNavigator(InferenceRule.DependenceNavigator that)
          Construct a new DependenceNavigator that is a copy of another DependenceNavigator.
 
Method Summary
 java.util.Collection next(java.lang.Object node)
           
 java.util.Collection prev(java.lang.Object node)
           
 void removeAll(java.util.Collection c)
          Remove all of the relations/rules in the given collection.
 void removeEdge(java.lang.Object from, java.lang.Object to)
          Remove a specific edge from this navigator.
 void retainAll(java.util.Collection c)
          Retain only the relations/rules in the given collection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InferenceRule.DependenceNavigator

public InferenceRule.DependenceNavigator(java.util.Collection rules)
Construct a new DependenceNavigator using the given collection of rules.

Parameters:
rules - rules

InferenceRule.DependenceNavigator

public InferenceRule.DependenceNavigator(InferenceRule.DependenceNavigator that)
Construct a new DependenceNavigator that is a copy of another DependenceNavigator.

Parameters:
that - the one to copy from
Method Detail

retainAll

public void retainAll(java.util.Collection c)
Retain only the relations/rules in the given collection.

Parameters:
c - collection to retain

removeAll

public void removeAll(java.util.Collection c)
Remove all of the relations/rules in the given collection.

Parameters:
c - collection to remove

removeEdge

public void removeEdge(java.lang.Object from,
                       java.lang.Object to)
Remove a specific edge from this navigator.

Parameters:
from - source of edge
to - target of edge

next

public java.util.Collection next(java.lang.Object node)
Specified by:
next in interface jwutil.graphs.Navigator

prev

public java.util.Collection prev(java.lang.Object node)
Specified by:
prev in interface jwutil.graphs.Navigator


Copyright © 2004-2008 Stanford SUIF Compiler Group. All Rights Reserved.