Use 
PREV   NEXT      All Classes   All Packages
FlexDoc/Javadoc 2.0
Demo Java Doc

Uses of Interface
java.util.Comparator
Packages that use Comparator
Provides classes that are fundamental to the design of the Java programming language.
Contains the collections framework, some internationalization support classes, a service loader, properties, random number generation, string parsing and scanning classes, base64 encoding and decoding, a bit array, and several miscellaneous utility classes.
Utility classes commonly useful in concurrent programming.
Fields in java.lang declared as Comparator
static final Comparator<String>
A Comparator that orders String objects as by compareToIgnoreCase.
Methods in java.util that return Comparator
static <T> Comparator<T>
Collections.reverseOrder()
Returns a comparator that imposes the reverse of the natural ordering on a collection of objects that implement the Comparable interface.
static <T> Comparator<T>
Collections.reverseOrder(Comparator<T> cmp)
Returns a comparator that imposes the reverse ordering of the specified comparator.
static <T,U extends Comparable<? super U>> Comparator<T>
Comparator.comparing(Function<? super T,? extends U> keyExtractor)
Accepts a function that extracts a Comparable sort key from a type T, and returns a Comparator<T> that compares by that sort key.
static <T,U> Comparator<T>
Comparator.comparing(Function<? super T,? extends U> keyExtractor, Comparator<? super U> keyComparator)
Accepts a function that extracts a sort key from a type T, and returns a Comparator<T> that compares by that sort key using the specified Comparator.
static <T> Comparator<T>
Comparator.comparingDouble(ToDoubleFunction<? super T> keyExtractor)
Accepts a function that extracts a double sort key from a type T, and returns a Comparator<T> that compares by that sort key.
static <T> Comparator<T>
Comparator.comparingInt(ToIntFunction<? super T> keyExtractor)
Accepts a function that extracts an int sort key from a type T, and returns a Comparator<T> that compares by that sort key.
static <T> Comparator<T>
Comparator.comparingLong(ToLongFunction<? super T> keyExtractor)
Accepts a function that extracts a long sort key from a type T, and returns a Comparator<T> that compares by that sort key.
static <T extends Comparable<? super T>> Comparator<T>
Comparator.naturalOrder()
Returns a comparator that compares Comparable objects in natural order.
static <T> Comparator<T>
Comparator.nullsFirst(Comparator<? super T> comparator)
Returns a null-friendly comparator that considers null to be less than non-null.
static <T> Comparator<T>
Comparator.nullsLast(Comparator<? super T> comparator)
Returns a null-friendly comparator that considers null to be greater than non-null.
default Comparator<T>
Comparator.reversed()
Returns a comparator that imposes the reverse ordering of this comparator.
static <T extends Comparable<? super T>> Comparator<T>
Comparator.reverseOrder()
Returns a comparator that imposes the reverse of the natural ordering.
default Comparator<T>
Comparator.thenComparing(Comparator<? super T> other)
Returns a lexicographic-order comparator with another comparator.
default <U extends Comparable<? super U>> Comparator<T>
Comparator.thenComparing(Function<? super T,? extends U> keyExtractor)
Returns a lexicographic-order comparator with a function that extracts a Comparable sort key.
default <U> Comparator<T>
Comparator.thenComparing(Function<? super T,? extends U> keyExtractor, Comparator<? super U> keyComparator)
Returns a lexicographic-order comparator with a function that extracts a key to be compared with the given Comparator.
default Comparator<T>
Comparator.thenComparingDouble(ToDoubleFunction<? super T> keyExtractor)
Returns a lexicographic-order comparator with a function that extracts a double sort key.
default Comparator<T>
Comparator.thenComparingInt(ToIntFunction<? super T> keyExtractor)
Returns a lexicographic-order comparator with a function that extracts an int sort key.
default Comparator<T>
Comparator.thenComparingLong(ToLongFunction<? super T> keyExtractor)
Returns a lexicographic-order comparator with a function that extracts a long sort key.
static <K extends Comparable<? super K>,V> Comparator<Map.Entry<K,V>>
Map.Entry.comparingByKey()
Returns a comparator that compares Map.Entry in natural order on key.
static <K,V> Comparator<Map.Entry<K,V>>
Map.Entry.comparingByKey(Comparator<? super K> cmp)
Returns a comparator that compares Map.Entry by key using the given Comparator.
static <K,V extends Comparable<? super V>> Comparator<Map.Entry<K,V>>
Map.Entry.comparingByValue()
Returns a comparator that compares Map.Entry in natural order on value.
static <K,V> Comparator<Map.Entry<K,V>>
Map.Entry.comparingByValue(Comparator<? super V> cmp)
Returns a comparator that compares Map.Entry by value using the given Comparator.
Comparator<? super E>
PriorityQueue.comparator()
Returns the comparator used to order the elements in this queue, or null if this queue is sorted according to the natural ordering of its elements.
Comparator<? super K>
SortedMap.comparator()
Returns the comparator used to order the keys in this map, or null if this map uses the natural ordering of its keys.
Comparator<? super E>
SortedSet.comparator()
Returns the comparator used to order the elements in this set, or null if this set uses the natural ordering of its elements.
default Comparator<? super T>
Spliterator.getComparator()
If this Spliterator's source is Spliterator.SORTED by a Comparator, returns that Comparator.
Comparator<? super K>
TreeMap.comparator()
Returns the comparator used to order the keys in this map, or null if this map uses the natural ordering of its keys.
Comparator<? super E>
TreeSet.comparator()
Returns the comparator used to order the elements in this set, or null if this set uses the natural ordering of its elements.
Methods in java.util with parameters of type Comparator
void
ArrayList.sort(Comparator<? super E> c)
Sorts this list according to the order induced by the specified Comparator.
static <T> int
Arrays.binarySearch(T[] a, int fromIndex, int toIndex, T key, Comparator<? super T> c)
Searches a range of the specified array for the specified object using the binary search algorithm.
static <T> int
Arrays.binarySearch(T[] a, T key, Comparator<? super T> c)
Searches the specified array for the specified object using the binary search algorithm.
static <T> int
Arrays.compare(T[] a, int aFromIndex, int aToIndex, T[] b, int bFromIndex, int bToIndex, Comparator<? super T> cmp)
Compares two Object arrays lexicographically over the specified ranges.
static <T> int
Arrays.compare(T[] a, T[] b, Comparator<? super T> cmp)
Compares two Object arrays lexicographically using a specified comparator.
static <T> boolean
Arrays.equals(T[] a, int aFromIndex, int aToIndex, T[] b, int bFromIndex, int bToIndex, Comparator<? super T> cmp)
Returns true if the two specified arrays of Objects, over the specified ranges, are equal to one another.
static <T> boolean
Arrays.equals(T[] a, T[] a2, Comparator<? super T> cmp)
Returns true if the two specified arrays of Objects are equal to one another.
static <T> int
Arrays.mismatch(T[] a, int aFromIndex, int aToIndex, T[] b, int bFromIndex, int bToIndex, Comparator<? super T> cmp)
Finds and returns the relative index of the first mismatch between two Object arrays over the specified ranges, otherwise return -1 if no mismatch is found.
static <T> int
Arrays.mismatch(T[] a, T[] b, Comparator<? super T> cmp)
Finds and returns the index of the first mismatch between two Object arrays, otherwise return -1 if no mismatch is found.
static <T> void
Arrays.parallelSort(T[] a, Comparator<? super T> cmp)
Sorts the specified array of objects according to the order induced by the specified comparator.
static <T> void
Arrays.parallelSort(T[] a, int fromIndex, int toIndex, Comparator<? super T> cmp)
Sorts the specified range of the specified array of objects according to the order induced by the specified comparator.
static <T> void
Arrays.sort(T[] a, Comparator<? super T> c)
Sorts the specified array of objects according to the order induced by the specified comparator.
static <T> void
Arrays.sort(T[] a, int fromIndex, int toIndex, Comparator<? super T> c)
Sorts the specified range of the specified array of objects according to the order induced by the specified comparator.
static <T> int
Collections.binarySearch(List<? extends T> list, T key, Comparator<? super T> c)
Searches the specified list for the specified object using the binary search algorithm.
static <TT
Collections.max(Collection<? extends T> coll, Comparator<? super T> comp)
Returns the maximum element of the given collection, according to the order induced by the specified comparator.
static <TT
Collections.min(Collection<? extends T> coll, Comparator<? super T> comp)
Returns the minimum element of the given collection, according to the order induced by the specified comparator.
static <T> Comparator<T>
Collections.reverseOrder(Comparator<T> cmp)
Returns a comparator that imposes the reverse ordering of the specified comparator.
static <T> void
Collections.sort(List<T> list, Comparator<? super T> c)
Sorts the specified list according to the order induced by the specified comparator.
static <T,U> Comparator<T>
Comparator.comparing(Function<? super T,? extends U> keyExtractor, Comparator<? super U> keyComparator)
Accepts a function that extracts a sort key from a type T, and returns a Comparator<T> that compares by that sort key using the specified Comparator.
static <T> Comparator<T>
Comparator.nullsFirst(Comparator<? super T> comparator)
Returns a null-friendly comparator that considers null to be less than non-null.
static <T> Comparator<T>
Comparator.nullsLast(Comparator<? super T> comparator)
Returns a null-friendly comparator that considers null to be greater than non-null.
default Comparator<T>
Comparator.thenComparing(Comparator<? super T> other)
Returns a lexicographic-order comparator with another comparator.
default <U> Comparator<T>
Comparator.thenComparing(Function<? super T,? extends U> keyExtractor, Comparator<? super U> keyComparator)
Returns a lexicographic-order comparator with a function that extracts a key to be compared with the given Comparator.
default void
List.sort(Comparator<? super E> c)
Sorts this list according to the order induced by the specified Comparator.
static <K,V> Comparator<Map.Entry<K,V>>
Map.Entry.comparingByKey(Comparator<? super K> cmp)
Returns a comparator that compares Map.Entry by key using the given Comparator.
static <K,V> Comparator<Map.Entry<K,V>>
Map.Entry.comparingByValue(Comparator<? super V> cmp)
Returns a comparator that compares Map.Entry by value using the given Comparator.
static <T> int
Objects.compare(T a, T b, Comparator<? super T> c)
Returns 0 if the arguments are identical and c.compare(a, b) otherwise.
void
Vector.sort(Comparator<? super E> c)
Sorts this list according to the order induced by the specified Comparator.
Constructors in java.util with parameters of type Comparator
PriorityQueue(Comparator<? super E> comparator)
Creates a PriorityQueue with the default initial capacity and whose elements are ordered according to the specified comparator.
PriorityQueue(int initialCapacity, Comparator<? super E> comparator)
Creates a PriorityQueue with the specified initial capacity that orders its elements according to the specified comparator.
TreeMap(Comparator<? super K> comparator)
Constructs a new, empty tree map, ordered according to the given comparator.
TreeSet(Comparator<? super E> comparator)
Constructs a new, empty tree set, sorted according to the specified comparator.
Methods in java.util.concurrent that return Comparator
Comparator<? super K>
ConcurrentSkipListMap.comparator()
Returns the comparator used to order the keys in this map, or null if this map uses the natural ordering of its keys.
Comparator<? super E>
ConcurrentSkipListSet.comparator()
Returns the comparator used to order the elements in this set, or null if this set uses the natural ordering of its elements.
Comparator<? super E>
PriorityBlockingQueue.comparator()
Returns the comparator used to order the elements in this queue, or null if this queue uses the natural ordering of its elements.
Methods in java.util.concurrent with parameters of type Comparator
void
CopyOnWriteArrayList.sort(Comparator<? super E> c)
Sorts this list according to the order induced by the specified Comparator.
Constructors in java.util.concurrent with parameters of type Comparator
ConcurrentSkipListMap(Comparator<? super K> comparator)
Constructs a new, empty map, sorted according to the specified comparator.
ConcurrentSkipListSet(Comparator<? super E> comparator)
Constructs a new, empty set that orders its elements according to the specified comparator.
PriorityBlockingQueue(int initialCapacity, Comparator<? super E> comparator)
Creates a PriorityBlockingQueue with the specified initial capacity that orders its elements according to the specified comparator.

 Use 
PREV   NEXT      All Classes   All Packages
FlexDoc/Javadoc 2.0
Demo Java Doc

Java API documentation generated with FlexDoc/Javadoc 2.0 using JavadocClassic 3.0 template set.
FlexDoc/Javadoc is a template-driven programming tool for rapid development of any Javadoc-based Java API documentation generators (i.e. doclets). If you need to customize your Javadoc without writing a full-blown doclet from scratch, FlexDoc/Javadoc may be the only tool able to help you! Find out more at www.flexdoc.xyz