hw4
Interface HierarchyInterface

All Known Implementing Classes:
CourseHierarchy

public interface HierarchyInterface


Method Summary
 void assertParentOf(Type a, Type b)
          Type a is the parent type of b
 void finished()
          No more changes.
 Type getSuperClass(Type t1)
          Return the parent of the supplied type, null if none
 boolean narrows(Type t1, Type t2)
          is t1 a direct or indirect subclass of t2?
 boolean widens(Type t1, Type t2)
          Is t1 a direct or indirect superclass of t2?
 

Method Detail

assertParentOf

public void assertParentOf(Type a,
                           Type b)
Type a is the parent type of b


finished

public void finished()
No more changes. Make sure the tree is rooted and compute depth-first stuff


narrows

public boolean narrows(Type t1,
                       Type t2)
is t1 a direct or indirect subclass of t2?


widens

public boolean widens(Type t1,
                      Type t2)
Is t1 a direct or indirect superclass of t2?


getSuperClass

public Type getSuperClass(Type t1)
Return the parent of the supplied type, null if none