public class XcoreIterableExtensions
extends java.lang.Object
iterables.| Constructor and Description |
|---|
XcoreIterableExtensions() |
| Modifier and Type | Method and Description |
|---|---|
static <T extends java.lang.Comparable<? super T>> |
sortEList(java.lang.Iterable<T> iterable)
Creates a sorted list containing the elements of the given iterable in ascending order according to the natural ordering of the elements.
|
static <T> EList<T> |
sortEList(java.lang.Iterable<T> iterable,
java.util.Comparator<? super T> comparator)
Creates a sorted list containing the element of the given iterable in ascending order according to the order induced by the comparator.
|
static <T,C extends java.lang.Comparable<? super C>> |
sortEListBy(java.lang.Iterable<T> iterable,
Creates a sorted list that contains the elements of the given iterable in ascending order according to the nature order of the corresponding element induced by the key function.
|
public static <T extends java.lang.Comparable<? super T>> EList<T> sortEList(java.lang.Iterable<T> iterable)
iterable - the items to be sorted. May not be null.public static <T> EList<T> sortEList(java.lang.Iterable<T> iterable, java.util.Comparator<? super T> comparator)
iterable - the items to be sorted. May not be null.comparator - the comparator to be used; it may be null to indicate that the natural ordering of the elements should be used.public static <T,C extends java.lang.Comparable<? super C>> EList<T> sortEListBy(java.lang.Iterable<T> iterable,key)
iterable - the elements to be sorted. May not be null.key - the key function to be applied to each element. May not be null.