All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface com.roguewave.tools.v2-0.Comparator

public interface Comparator
Implementing this interface allows an object to act as a comparator for the purpose of ordering elements in sorted collections such as BTree and BinaryTree.

Two concrete Comparator classes, StringCompare and NumericCompare, are included with this package.

See Also:
BinaryTree, BTree, NumericCompare, StringCompare

Method Index

 o compare(Object, Object)
Compare two objects.

Methods

 o compare
 public abstract int compare(Object a,
                             Object b)
Compare two objects.

Returns:
< 0 if a is less than b
= 0 if a compares equal to b
> 0 if a is greater than b

All Packages  Class Hierarchy  This Package  Previous  Next  Index