Interface Sort


public interface Sort

Interface for classes that sort an array of objects.

Since:
JDK1.2

Method Summary
 int sort(java.lang.Comparable[] a)
          Sorts an array of objects.
 

Method Detail

sort

public int sort(java.lang.Comparable[] a)
Sorts an array of objects. Objects must support the Comparable interface; that is, they must have a compareTo() method. a.compareTo(b) should return a negative number if a is less than b, a postive number if a is greater than b, and zero otherwise.

Returns:
number of calls to compareTo()