Class SortWith<A>
java.lang.Object
com.jnape.palatable.lambda.functions.builtin.fn2.SortWith<A>
- Type Parameters:
A- the input Iterable and output List element type
- All Implemented Interfaces:
Fn1<Comparator<? super A>, Fn1<Iterable<A>, List<A>>>, Fn2<Comparator<? super A>, Iterable<A>, List<A>>, Applicative<Fn1<Iterable<A>, List<A>>, Fn1<Comparator<? super A>, ?>>, Cartesian<Comparator<? super A>, Fn1<Iterable<A>, List<A>>, Fn1<?,?>>, Cocartesian<Comparator<? super A>, Fn1<Iterable<A>, List<A>>, Fn1<?, ?>>, Contravariant<Comparator<? super A>, Profunctor<?, Fn1<Iterable<A>, List<A>>, Fn1<?, ?>>>, Functor<Fn1<Iterable<A>, List<A>>, Fn1<Comparator<? super A>, ?>>, Profunctor<Comparator<? super A>, Fn1<Iterable<A>, List<A>>, Fn1<?, ?>>, Monad<Fn1<Iterable<A>, List<A>>, Fn1<Comparator<? super A>, ?>>, MonadReader<Comparator<? super A>, Fn1<Iterable<A>, List<A>>, Fn1<Comparator<? super A>, ?>>, MonadRec<Fn1<Iterable<A>, List<A>>, Fn1<Comparator<? super A>, ?>>, MonadWriter<Comparator<? super A>, Fn1<Iterable<A>, List<A>>, Fn1<Comparator<? super A>, ?>>
public final class SortWith<A>
extends Object
implements Fn2<Comparator<? super A>, Iterable<A>, List<A>>
Given an
Iterable and a Comparator over the Iterable element type, produce a
sorted List of the original elements based on sorting applied by the Comparator. Note that
this is both eager and monolithic.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptioncheckedApply(Comparator<? super A> comparator, Iterable<A> as) static <A> SortWith<A> sortWith()sortWith(Comparator<? super A> comparator) static <A> List<A> sortWith(Comparator<? super A> comparator, Iterable<A> as) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Fn1
andThen, carry, cartesian, censor, choose, cocartesian, diMap, diMapR, discardL, flatMap, fmap, lazyZip, listens, local, pure, self, thunk, toFunction, trampolineM, zip, zip
-
Method Details
-
checkedApply
- Specified by:
checkedApplyin interfaceFn2<Comparator<? super A>, Iterable<A>, List<A>>
-
sortWith
-
sortWith
-
sortWith
-