import IncomparableException; /** * Objects that can compare pairs of objects (for equality and * ordering). Typically used to help with sorting. * * @author Chris Kern * @author Erin Nichols * @author Joe Simonson * @author Samuel A. Rebelsky * @version 1.1b5 of October 1999 */ public class MessageComparatorStub implements Comparator { /** * Determine if the first element is strictly smaller than the * second. Throws an exception if the two elements cannot * be compared. */ public boolean lessThan(Object first, Object second) throws IncomparableException { return true; } //lessThan /** * Determine if the first element is strictly larger than the * second. Throws an exception if the two elements cannot * be compared. */ public boolean greaterThan(Object first, Object second) throws IncomparableException { return true; }//greaterThan /** * Determine if the first element is equal to the second. Throws * an exception if the two elements cannot be compared. */ public boolean equals(Object first, Object second) throws IncomparableException { return true; }//equals /** Purpose: determines whether a smaller string is contained in a larger string * Parameters: 1. the string we're looking for * 2. the string we're looking in * Preconditions: small and big are valid strings * Postconditions: if small is found in big, return true; otherwise false * Produces: true or false * Problems: small might be larger than big. */ public boolean contains(String small, String big) throws IncomparableException { return true; }//contains } // interface MessageComparatorStub