coursesolutions
Class CourseHierarchy

java.lang.Object
  extended by coursesolutions.CourseHierarchy
All Implemented Interfaces:
HierarchyInterface

public class CourseHierarchy
extends java.lang.Object
implements HierarchyInterface


Constructor Summary
CourseHierarchy()
           
 
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)
          Get the supplied type's superclass
 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?
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CourseHierarchy

public CourseHierarchy()
Method Detail

assertParentOf

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

Specified by:
assertParentOf in interface HierarchyInterface

finished

public void finished()
No more changes

Specified by:
finished in interface HierarchyInterface

narrows

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

Specified by:
narrows in interface HierarchyInterface

widens

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

Specified by:
widens in interface HierarchyInterface

getSuperClass

public Type getSuperClass(Type t1)
Get the supplied type's superclass

Specified by:
getSuperClass in interface HierarchyInterface