*/
public int compareTo(Object aObject) {
if (!(aObject instanceof Time)) {
- throw new RuntimeException("object not an instance of Time");
+ throw new IllegalArgumentException("object not an instance of Time");
}
Time time = (Time) aObject;
return new Float(asFloat()).compareTo(new Float(time.asFloat()));