tribble.util
Interface Comparable


public interface Comparable

Contains methods which are used to compare two objects.

Since:
2000-04-22
Version:
$Revision: 1.2 $ $Date: 2003/02/11 03:40:50 $
Author:
David R. Tribble, david@tribble.com
Copyright 2000 by David R. Tribble, all rights reserved.
Permission is granted to freely use and distribute this source code provided that the original copyright and authorship notices remain intact.
See Also:
BinarySearch

Field Summary
static java.lang.String REV
          Revision information.
static int VERS
          Class revision number.
 
Method Summary
 int compare(java.lang.Object a, java.lang.Object b)
          Compares two objects.
 int compareTo(java.lang.Object b)
          Compares this to another object b.
 

Field Detail

REV

static final java.lang.String REV
Revision information.

See Also:
Constant Field Values

VERS

static final int VERS
Class revision number.

See Also:
Constant Field Values
Method Detail

compare

int compare(java.lang.Object a,
            java.lang.Object b)
Compares two objects.

Parameters:
a - The first (left) object to compare.
b - The second (right) object to compare.
Returns:
A signed integer value x, where:
x < 0 if a is less than b;
x = 0 if a is equal to b;
x > 0 if a is greater than b.
Since:
1.1, 2000-04-22

compareTo

int compareTo(java.lang.Object b)
Compares this to another object b.

Parameters:
a - The second (right) object to compare.
Returns:
A signed integer value x, where:
x < 0 if this is less than b;
x = 0 if this is equal to b;
x > 0 if this is greater than b.
Since:
1.1, 2000-04-22