All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface collections.Comparator

public interface interface Comparator
extends Serializable
Comparator is an interface for any class possessing an element comparison method.


Method Index

 o compare(Object, Object)
Compare two Objects with respect to ordering.

Methods

 o compare
 public abstract int compare(Object fst,
                             Object snd)
Compare two Objects with respect to ordering. Typical implementations first cast their arguments to particular types in order to perform comparison

Parameters:
fst - first argument
snd - second argument
Returns:
a negative number if fst is less than snd; a positive number if fst is greater than snd; else 0

All Packages  Class Hierarchy  This Package  Previous  Next  Index