程序包 amo.lib.linq

类 Linq

java.lang.Object
amo.lib.linq.Linq

public final class Linq
extends Object
  • 方法详细资料

    • stream

      public static <T> Stream<T> stream​(T[] array)
      Decorates the passed iterable with a Stream.
      类型参数:
      T - the generic type of the array
      参数:
      array - a generic typed iterable (usually implementing the Collection interface)
      返回:
      a new Stream object that decorates the passed array
    • stream

      public static <T> Stream<T> stream​(List<T> list)
      Decorates the passed list with a Stream.
      类型参数:
      T - the generic type of the list
      参数:
      list - a generic typed list (usually implementing the List interface)
      返回:
      a new Stream object that decorates the passed list
    • stream

      public static <T> Stream<T> stream​(Iterable<T> iterable)
      Decorates the passed iterable with a Stream.
      类型参数:
      T - the generic type of the iterable
      参数:
      iterable - a generic typed iterable (usually implementing the Collection interface)
      返回:
      a new Stream object that decorates the passed iterable
    • stream

      public static <TKey,​ TValue> Stream<Map.Entry<TKey,​TValue>> stream​(Map<TKey,​TValue> map)
      Decorates the passed map with a Stream.
      类型参数:
      TKey - the generic type of the map key
      TValue - the generic type for the map value
      参数:
      map - a generic typed map.
      返回:
      a new Stream object that decorates the passed map entry set
      另请参阅:
      Map.entrySet()