|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object | +--Opus5.AbstractObject
The AbstractObject class is the base class
from which all concrete classes that implement
the Comparable interface are derived.
This abstract class provides default implementations for various methods
declared in the Comparable interface.
Comparable| Fields inherited from interface Opus5.Comparable |
copyright |
| Constructor Summary | |
AbstractObject()
|
|
| Method Summary | |
int |
compare(Comparable arg)
Compares this comparable object to the specified comparable object. |
protected abstract int |
compareTo(Comparable arg)
Compares this comparable object to the specified comparable object. |
boolean |
equals(java.lang.Object object)
Tests whether this comparable object equals the specified object. |
boolean |
isEQ(Comparable object)
Tests whether this comparable object is equal to the specified comparable object. |
boolean |
isGE(Comparable object)
Tests whether this comparable object is greater than or equal to the specified comparable object. |
boolean |
isGT(Comparable object)
Tests whether this comparable object is greater than the specified comparable object. |
boolean |
isLE(Comparable object)
Tests whether this comparable object is less than or equal to the specified comparable object. |
boolean |
isLT(Comparable object)
Tests whether this comparable object is less than the specified comparable object. |
boolean |
isNE(Comparable object)
Tests whether this comparable object is not equal to the specified comparable object. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public AbstractObject()
| Method Detail |
protected abstract int compareTo(Comparable arg)
compare method.
When this method is called,
it shall always be the case that the actual class of this object
is the same as the actual class of the specified object.arg - The object to which this object is compared.compare(Opus5.Comparable)public final int compare(Comparable arg)
compareTo is used to do the comparison.
If this object and the specified object are instances of different
classes, the result is obtained by comparing the compareTo for strings.compare in interface Comparablearg - The comparable object to which this object is compared.compareTo(Opus5.Comparable)public final boolean isLT(Comparable object)
return compare (object) < 0;
isLT in interface Comparableobject - The object with which this object is compared.compare(Opus5.Comparable)public final boolean isLE(Comparable object)
return compare (object) <= 0;
isLE in interface Comparableobject - The object with which this object is compared.compare(Opus5.Comparable)public final boolean isGT(Comparable object)
return compare (object) > 0;
isGT in interface Comparableobject - The object with which this object is compared.compare(Opus5.Comparable)public final boolean isGE(Comparable object)
return compare (object) >= 0;
isGE in interface Comparableobject - The object with which this object is compared.compare(Opus5.Comparable)public final boolean isEQ(Comparable object)
return compare (object) == 0;
isEQ in interface Comparableobject - The object with which this object is compared.compare(Opus5.Comparable)public final boolean isNE(Comparable object)
return compare (object) != 0;
isNE in interface Comparableobject - The object with which this object is compared.compare(Opus5.Comparable)public final boolean equals(java.lang.Object object)
Comparable interface,
the isEQ method is called to do the comparsion.
Otherwise, the objects are not equal.equals in class java.lang.Objectobject - The object with which this object is compared.compare(Opus5.Comparable),
Comparable
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||