Class TypeComparator
java.lang.Object
EDU.purdue.cs.bloat.editor.TypeComparator
- All Implemented Interfaces:
Comparator
A TypeComparator orders Types such that a subclass
preceededs its superclass. Note that this doesn't really work with
interfaces.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Field Details
-
DEBUG
public static boolean DEBUG
-
-
Constructor Details
-
TypeComparator
Constructor.
-
-
Method Details
-
compare
Returns a negative value if o1 invalid input: '<' o2 (t1 is a subclass of t2). Otherwise, it returns a positive value.- Specified by:
comparein interfaceComparator
-
equals
Indicates whether some other object is "equal to" this Comparator.- Specified by:
equalsin interfaceComparator- Overrides:
equalsin classObject
-