All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface collections.SortableCollection

public interface interface SortableCollection
extends UpdatableCollection
Sortable is a mixin interface for UpdatableCollections supporting a sort method that accepts a user-supplied Comparator with a compare method that accepts any two Objects and returns -1/0/+1 depending on whether the first is less than, equal to, or greater than the second.

After sorting, but in the absence of other mutative operations, Sortable Collections guarantee that enumerations appear in sorted order; that is if a and b are two elements obtained in succession from nextElement(), that

 comparator().compare(a, b) <= 0.
 


Method Index

 o sort(Comparator)
Sort the current elements with respect to cmp.compare.

Methods

 o sort
 public abstract void sort(Comparator cmp)
Sort the current elements with respect to cmp.compare.


All Packages  Class Hierarchy  This Package  Previous  Next  Index