类 FastStream.Wrapped<T>

java.lang.Object
committee.nova.mods.avaritia.api.util.java.FastStream.Wrapped<T>
所有已实现的接口:
FastStream<T>, Iterable<T>
封闭接口:
FastStream<T>

public static final class FastStream.Wrapped<T> extends Object implements FastStream<T>
Wraps a regular Iterable into a FastStream.
  • 方法详细资料

    • iterator

      public Iterator<T> iterator()
      指定者:
      iterator 在接口中 Iterable<T>
    • forEach

      public void forEach(Consumer<? super T> action)
      指定者:
      forEach 在接口中 Iterable<T>
    • knownLength

      public int knownLength(boolean consumeToCalculate)
      从接口复制的说明: FastStream
      Returns the known length for the stream.

      If true is specified to consumeToCalculate causes operations which would not normally know their length prior to a terminal operation being applied, to cache their result under the assumption that the stream is about to be fully consumed.

      指定者:
      knownLength 在接口中 FastStream<T>
      参数:
      consumeToCalculate - If the caller intends to consume the entire stream via Iterable.forEach(java.util.function.Consumer<? super T>) after calling.
      返回:
      The known length for the stream. {code -1} if the length is not known.