JavaTM 2 Platform
Std. Ed. v1.4.1

Uses of Interface
java.util.Comparator

Packages that use Comparator
java.lang Provides classes that are fundamental to the design of the Java programming language. 
java.text Provides classes and interfaces for handling text, dates, numbers, and messages in a manner independent of natural languages. 
java.util Contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes (a string tokenizer, a random-number generator, and a bit array). 
javax.swing Provides a set of "lightweight" (all-Java language) components that, to the maximum degree possible, work the same on all platforms. 
 

Uses of Comparator in java.lang
 

Fields in java.lang declared as Comparator
static Comparator String.CASE_INSENSITIVE_ORDER
          A Comparator that orders String objects as by compareToIgnoreCase.
 

Uses of Comparator in java.text
 

Classes in java.text that implement Comparator
 class Collator
          The Collator class performs locale-sensitive String comparison.
 class RuleBasedCollator
          The RuleBasedCollator class is a concrete subclass of Collator that provides a simple, data-driven, table collator.
 

Uses of Comparator in java.util
 

Methods in java.util that return Comparator
 Comparator TreeMap.comparator()
          Returns the comparator used to order this map, or null if this map uses its keys' natural order.
 Comparator TreeSet.comparator()
          Returns the comparator used to order this sorted set, or null if this tree set uses its elements natural ordering.
static Comparator Collections.reverseOrder()
          Returns a comparator that imposes the reverse of the natural ordering on a collection of objects that implement the Comparable interface.
 Comparator SortedSet.comparator()
          Returns the comparator associated with this sorted set, or null if it uses its elements' natural ordering.
 Comparator SortedMap.comparator()
          Returns the comparator associated with this sorted map, or null if it uses its keys' natural ordering.
 

Methods in java.util with parameters of type Comparator
static void Arrays.sort(Object[] a, Comparator c)
          Sorts the specified array of objects according to the order induced by the specified comparator.
static void Arrays.sort(Object[] a, int fromIndex, int toIndex, Comparator c)
          Sorts the specified range of the specified array of objects according to the order induced by the specified comparator.
static int Arrays.binarySearch(Object[] a, Object key, Comparator c)
          Searches the specified array for the specified object using the binary search algorithm.
static void Collections.sort(List list, Comparator c)
          Sorts the specified list according to the order induced by the specified comparator.
static int Collections.binarySearch(List list, Object key, Comparator c)
          Searches the specified list for the specified object using the binary search algorithm.
static Object Collections.min(Collection coll, Comparator comp)
          Returns the minimum element of the given collection, according to the order induced by the specified comparator.
static Object Collections.max(Collection coll, Comparator comp)
          Returns the maximum element of the given collection, according to the order induced by the specified comparator.
 

Constructors in java.util with parameters of type Comparator
TreeMap(Comparator c)
          Constructs a new, empty map, sorted according to the given comparator.
TreeSet(Comparator c)
          Constructs a new, empty set, sorted according to the specified comparator.
 

Uses of Comparator in javax.swing
 

Methods in javax.swing that return Comparator
protected  Comparator SortingFocusTraversalPolicy.getComparator()
          Returns the Comparator which will be used to sort the Components in a focus traversal cycle.
 

Methods in javax.swing with parameters of type Comparator
protected  void SortingFocusTraversalPolicy.setComparator(Comparator comparator)
          Sets the Comparator which will be used to sort the Components in a focus traversal cycle.
 

Constructors in javax.swing with parameters of type Comparator
SortingFocusTraversalPolicy(Comparator comparator)
          Constructs a SortingFocusTraversalPolicy with the specified Comparator.
 


JavaTM 2 Platform
Std. Ed. v1.4.1

Submit a bug or feature
For further API reference and developer documentation, see Java 2 SDK SE Developer Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.

Copyright 2002 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.