|
FlexDoc/Javadoc 2.0 Demo Java Doc |
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.
|
Uses of Comparator in java.lang |
Fields in java.lang declared as Comparator |
|
static final Comparator<String> |
String.CASE_INSENSITIVE_ORDER
A Comparator that orders String objects as by
compareToIgnoreCase.
|
Uses of Comparator in java.util |
Methods in java.util that return Comparator |
|
Collections.reverseOrder()
Returns a comparator that imposes the reverse of the natural
ordering on a collection of objects that implement the
Comparable interface.
|
|
Returns a comparator that imposes the reverse ordering of the specified
comparator.
|
|
Accepts a function that extracts a Comparable sort key from a type T, and returns a
Comparator<T> that compares by that sort key.
|
|
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.
|
|
Accepts a function that extracts a double sort key from a type
T, and returns a Comparator<T> that compares by that
sort key.
|
|
Accepts a function that extracts an int sort key from a type
T, and returns a Comparator<T> that compares by that
sort key.
|
|
Accepts a function that extracts a long sort key from a type
T, and returns a Comparator<T> that compares by that
sort key.
|
|
Comparator.naturalOrder()
Returns a comparator that compares Comparable objects in natural
order.
|
|
Returns a null-friendly comparator that considers null to be
less than non-null.
|
|
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.
|
Comparator.reverseOrder()
Returns a comparator that imposes the reverse of the natural
ordering.
|
|
default Comparator<T> |
Returns a lexicographic-order comparator with another comparator.
|
Returns a lexicographic-order comparator with a function that
extracts a Comparable sort key.
|
|
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> |
Returns a lexicographic-order comparator with a function that
extracts a double sort key.
|
default Comparator<T> |
Returns a lexicographic-order comparator with a function that
extracts an int sort key.
|
default Comparator<T> |
Returns a lexicographic-order comparator with a function that
extracts a long sort key.
|
Map.Entry.comparingByKey()
Returns a comparator that compares Map.Entry in natural order on key.
|
|
Returns a comparator that compares Map.Entry by key using the given
Comparator.
|
|
Map.Entry.comparingByValue()
Returns a comparator that compares Map.Entry in natural order on value.
|
|
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()
|
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 |
Sorts this list according to the order induced by the specified
Comparator.
|
static <T> int |
Searches a range of
the specified array for the specified object using the binary
search algorithm.
|
static <T> int |
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 |
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 |
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 |
Finds and returns the index of the first mismatch between two
Object arrays, otherwise return -1 if no mismatch is found.
|
static <T> void |
Sorts the specified array of objects according to the order induced by
the specified comparator.
|
static <T> void |
Sorts the specified range of the specified array of objects according
to the order induced by the specified comparator.
|
static <T> void |
Sorts the specified array of objects according to the order induced by
the specified comparator.
|
static <T> void |
Sorts the specified range of the specified array of objects according
to the order induced by the specified comparator.
|
static <T> int |
Searches the specified list for the specified object using the binary
search algorithm.
|
Returns the maximum element of the given collection, according to the
order induced by the specified comparator.
|
|
Returns the minimum element of the given collection, according to the
order induced by the specified comparator.
|
|
Returns a comparator that imposes the reverse ordering of the specified
comparator.
|
|
static <T> void |
Sorts the specified list according to the order induced by the
specified comparator.
|
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.
|
|
Returns a null-friendly comparator that considers null to be
less than non-null.
|
|
Returns a null-friendly comparator that considers null to be
greater than non-null.
|
|
default Comparator<T> |
Returns a lexicographic-order comparator with another comparator.
|
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 |
Sorts this list according to the order induced by the specified
Comparator.
|
Returns a comparator that compares Map.Entry by key using the given
Comparator.
|
|
Returns a comparator that compares Map.Entry by value using the given
Comparator.
|
|
static <T> int |
Returns 0 if the arguments are identical and
c.compare(a, b) otherwise.
|
void |
Sorts this list according to the order induced by the specified
Comparator.
|
Constructors in java.util with parameters of type Comparator |
|
Creates a PriorityQueue with the default initial capacity and
whose elements are ordered according to the specified comparator.
|
|
Creates a PriorityQueue with the specified initial capacity
that orders its elements according to the specified comparator.
|
|
Constructs a new, empty tree map, ordered according to the given
comparator.
|
|
Constructs a new, empty tree set, sorted according to the specified
comparator.
|
Uses of Comparator in java.util.concurrent |
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 |
Sorts this list according to the order induced by the specified
Comparator.
|
Constructors in java.util.concurrent with parameters of type Comparator |
|
Constructs a new, empty map, sorted according to the specified
comparator.
|
|
Constructs a new, empty set that orders its elements according to
the specified comparator.
|
|
Creates a PriorityBlockingQueue with the specified initial
capacity that orders its elements according to the specified
comparator.
|
|
FlexDoc/Javadoc 2.0 Demo Java Doc |