lab8
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

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


finished

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


narrows

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


widens

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


getSuperClass

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