程序包 amo.lib.linq

接口 OrderedStream<T>

所有超级接口:
Iterable<T>, Stream<T>

public interface OrderedStream<T>
extends Stream<T>
  • 方法详细资料

    • thenBy

      <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 - 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

      <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 - 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

      <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 - 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.