程序包 amo.lib.linq
接口 OrderedStream<T>
public interface OrderedStream<T> extends Stream<T>
-
方法概要
修饰符和类型 方法 说明 <TKey extends Comparable<TKey>>
OrderedStream<T>thenBy(Selector<T,TKey> keySelector)Performs a subsequent ordering of the elements in a sequence in ascending order according to a key.<TKey> OrderedStream<T>thenBy(Selector<T,TKey> keySelector, Comparator<TKey> comparator)Performs a subsequent ordering of the elements in a sequence in ascending order by using a specified comparator.<TKey extends Comparable<TKey>>
OrderedStream<T>thenByDescending(Selector<T,TKey> keySelector)Performs a subsequent ordering of the elements in a sequence in descending order, according to a key.<TKey> OrderedStream<T>thenByDescending(Selector<T,TKey> keySelector, Comparator<TKey> comparator)Performs a subsequent ordering of the elements in a sequence in descending order by using a specified comparer.
-
方法详细资料
-
thenBy
Performs a subsequent ordering of the elements in a sequence in ascending order by using a specified comparator.- 类型参数:
TKey- The type of the key returned by keySelector.- 参数:
keySelector- A function to extract a key from an element.comparator- An Comparator to compare keys.- 返回:
- An Stream of type T whose elements are sorted according to a key.
-
thenBy
Performs a subsequent ordering of the elements in a sequence in ascending order according to a key.- 类型参数:
TKey- The type of the key returned by keySelector.- 参数:
keySelector- A function to extract a key from an element.- 返回:
- An Stream of type T whose elements are sorted according to a key.
-
thenByDescending
<TKey> OrderedStream<T> thenByDescending(Selector<T,TKey> keySelector, Comparator<TKey> comparator)Performs a subsequent ordering of the elements in a sequence in descending order by using a specified comparer.- 类型参数:
TKey- The type of the key returned by keySelector.- 参数:
keySelector- A function to extract a key from an element.comparator- An Comparator to compare keys.- 返回:
- An Stream of type T whose elements are sorted according to a key.
-
thenByDescending
Performs a subsequent ordering of the elements in a sequence in descending order, according to a key.- 类型参数:
TKey- The type of the key returned by keySelector.- 参数:
keySelector- A function to extract a key from an element.- 返回:
- An Stream of type T whose elements are sorted according to a key.
-