Uses of Class
cloud.opencode.base.core.Ordering
Packages that use Ordering
Package
Description
Core utilities and foundational classes for the OpenCode Base library.
-
Uses of Ordering in cloud.opencode.base.core
Methods in cloud.opencode.base.core that return OrderingModifier and TypeMethodDescriptionstatic <T> Ordering<T> Ordering.allEqual()Returns an ordering that treats all values as equal.static <T> Ordering<T> Returns an ordering based on the iteration order of explicit values.static <T> Ordering<T> Ordering.explicit(T... valuesInOrder) Returns an ordering based on the iteration order of explicit values.static <T> Ordering<T> Ordering.from(Comparator<T> comparator) Creates an ordering from an existing comparator.static <T, U extends Comparable<? super U>>
Ordering<T> Creates an ordering by extracting a comparable key.static <T,U> Ordering <T> Ordering.from(Function<? super T, ? extends U> keyExtractor, Comparator<? super U> keyComparator) Creates an ordering by extracting a key and using a comparator.static <T extends Comparable<? super T>>
Ordering<T> Ordering.natural()Returns an ordering that uses the natural order of the values.Ordering.nullsFirst()Returns an ordering that treats null as less than all other values.Ordering.nullsLast()Returns an ordering that treats null as greater than all other values.<F> Ordering<F> Ordering.onResultOf(Function<F, ? extends T> function) Returns an ordering that applies a function before comparing.Ordering.reversed()Returns the reverse ordering.Ordering.thenComparing(Comparator<? super T> secondary) Returns a compound ordering with a secondary comparator.<U extends Comparable<? super U>>
Ordering<T> Ordering.thenComparing(Function<? super T, ? extends U> keyExtractor) Returns a compound ordering using a key extractor.