Opus5
Interface Comparable

All Known Subinterfaces:
Container, Deque, Digraph, DoubleEndedPriorityQueue, Edge, Graph, HashTable, MergeablePriorityQueue, Multiset, OrderedList, Partition, PriorityQueue, Queue, SearchableContainer, SearchTree, Set, Solution, SortedList, Stack, Tree, Vertex
All Known Implementing Classes:
AbstractObject

public interface Comparable

Encapsulates methods for comparing objects.

Version:
$Id: Comparable.java,v 3.2 1998/07/28 13:24:44 brpreiss Exp $
Author:
Bruno R. Preiss, P.Eng.

Field Summary
static java.lang.String copyright
           
 
Method Summary
 int compare(Comparable object)
          Compares this object with the specified one.
 boolean isEQ(Comparable object)
          Tests whether this object is equal to the specified one.
 boolean isGE(Comparable object)
          Tests whether this object is greater than or equal to the specified one.
 boolean isGT(Comparable object)
          Tests whether this object is greater than the specified one.
 boolean isLE(Comparable object)
          Tests whether this object is less than or equal to the specified one.
 boolean isLT(Comparable object)
          Tests whether this object is less than the specified one.
 boolean isNE(Comparable object)
          Tests whether this object is not equal to the specified one.
 

Field Detail

copyright

public static final java.lang.String copyright
Method Detail

isLT

public boolean isLT(Comparable object)
Tests whether this object is less than the specified one.
Parameters:
object - The object with which this object is compared.
Returns:
True if this object is less than the specified one.
See Also:
AbstractObject.isLT(Opus5.Comparable)

isLE

public boolean isLE(Comparable object)
Tests whether this object is less than or equal to the specified one.
Parameters:
object - The object with which this object is compared.
Returns:
True if this object is less than or equal to the specified one.
See Also:
AbstractObject.isLE(Opus5.Comparable)

isGT

public boolean isGT(Comparable object)
Tests whether this object is greater than the specified one.
Parameters:
object - The object with which this object is compared.
Returns:
True if this object is greater than the specified one.
See Also:
AbstractObject.isGT(Opus5.Comparable)

isGE

public boolean isGE(Comparable object)
Tests whether this object is greater than or equal to the specified one.
Parameters:
object - The object with which this object is compared.
Returns:
True if this object is greater than or equal to the specified one.
See Also:
AbstractObject.isGE(Opus5.Comparable)

isEQ

public boolean isEQ(Comparable object)
Tests whether this object is equal to the specified one.
Parameters:
object - The object with which this object is compared.
Returns:
True if this object is equal to the specified one.
See Also:
AbstractObject.isEQ(Opus5.Comparable)

isNE

public boolean isNE(Comparable object)
Tests whether this object is not equal to the specified one.
Parameters:
object - The object with which this object is compared.
Returns:
True if this object is not equal to the specified one.
See Also:
AbstractObject.isNE(Opus5.Comparable)

compare

public int compare(Comparable object)
Compares this object with the specified one.
Parameters:
object - The object with which this object is compared.
Returns:
An integer less than one if this object is less than the specified one; an integer greater than one if this object is greater than the specified one; and, zero if both objects are equal.
See Also:
AbstractObject.compare(Opus5.Comparable)