A
- the input Iterable and output List element typeB
- the mapped Comparable typepublic final class SortBy<A,B extends Comparable<B>> extends Object implements Fn2<Fn1<? super A,? extends B>,Iterable<A>,List<A>>
Iterable
and some mapping function from the Iterable
element type to some
Comparable
type, produce a sorted List
of the original elements based on sorting applied to the
result of the mapping function. Note that this is both eager and monolithic.Modifier and Type | Method and Description |
---|---|
List<A> |
checkedApply(Fn1<? super A,? extends B> fn,
Iterable<A> as) |
static <A,B extends Comparable<B>> |
sortBy() |
static <A,B extends Comparable<B>> |
sortBy(Fn1<? super A,? extends B> fn) |
static <A,B extends Comparable<B>> |
sortBy(Fn1<? super A,? extends B> fn,
Iterable<A> as) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
apply, apply, checkedApply, compose, contraMap, curried, curry, diMapL, discardR, flip, fn2, fromBiFunction, toBiFunction, uncurry, widen
public static <A,B extends Comparable<B>> SortBy<A,B> sortBy()
public static <A,B extends Comparable<B>> Fn1<Iterable<A>,List<A>> sortBy(Fn1<? super A,? extends B> fn)
public static <A,B extends Comparable<B>> List<A> sortBy(Fn1<? super A,? extends B> fn, Iterable<A> as)