UC Berkeley Group for User Interface Research
Updated November 17, 2000

edu.berkeley.guir.lib.util
Interface Comparison

All Known Implementing Classes:
NumComparison

public interface Comparison

An interface for a class that compares two objects and determines if they are "equal", "less than", or "greater than".

This software is distributed under the Berkeley Software License.

 Revisions:  - GUIRLib-v1.0-1.0.0, Nov 27 1997, JH
               Created class
             - GUIRLib-v1.2-1.0.0, Jun 22 2000, JH
               Touched for GUIRLib release
             - GUIRLib-v1.3-1.0.0, Aug 11 2000, JH
               Touched for GUIRLib release
             - GUIRLib-v1.4-1.0.0, Aug 31 2000, JH
               Touched for GUIRLib release
 

Since:
JDK 1.1.4
Version:
GUIRLib-v1.4-1.0.0, Aug 31 2000
Author:
Jason Hong ( jasonh@cs.berkeley.edu)

Method Summary
 boolean isEqual(Object obj1, Object obj2)
          Sees if two objects are "equal" or not (you may define equality in whatever way you want).
 boolean isGreaterThan(Object obj1, Object obj2)
          Sees if the first object is "greater than" the second object.
 boolean isGreaterThanOrEqual(Object obj1, Object obj2)
          Sees if the first object is "greater than or equal" to the second object.
 boolean isLessThan(Object obj1, Object obj2)
          Sees if the first object is "less than" the second object.
 boolean isLessThanOrEqual(Object obj1, Object obj2)
          Sees if the first object is "less than or equal" to the second object.
 

Method Detail

isEqual

public boolean isEqual(Object obj1,
                       Object obj2)
Sees if two objects are "equal" or not (you may define equality in whatever way you want).
Parameters:
obj1 - is some Object to be compared to obj2.
obj2 - is some Object to be compared to obj1.
Returns:
true if the two objects are "equal", false otherwise.

isLessThan

public boolean isLessThan(Object obj1,
                          Object obj2)
Sees if the first object is "less than" the second object.
Parameters:
obj1 - is some Object to be compared to obj2.
obj2 - is some Object to be compared to obj1.
Returns:
true if obj1 is "less than" obj2.

isLessThanOrEqual

public boolean isLessThanOrEqual(Object obj1,
                                 Object obj2)
Sees if the first object is "less than or equal" to the second object.
Parameters:
obj1 - is some Object to be compared to obj2.
obj2 - is some Object to be compared to obj1.
Returns:
true if obj1 is "less than or equal" to obj2.

isGreaterThan

public boolean isGreaterThan(Object obj1,
                             Object obj2)
Sees if the first object is "greater than" the second object.
Parameters:
obj1 - is some Object to be compared to obj2.
obj2 - is some Object to be compared to obj1.
Returns:
true if obj1 is "greater than" obj2.

isGreaterThanOrEqual

public boolean isGreaterThanOrEqual(Object obj1,
                                    Object obj2)
Sees if the first object is "greater than or equal" to the second object.
Parameters:
obj1 - is some Object to be compared to obj2.
obj2 - is some Object to be compared to obj1.
Returns:
true if obj1 is "greater than or equal" to obj2.

Copyright Information