类 FastStream.Group<K,V>

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

public static final class FastStream.Group<K,V> extends Object implements FastStream<V>
Represents a Key to sequence of values in a FastStream.groupBy(java.util.function.Function<? super T, ? extends K>) grouping.
  • 构造器详细资料

    • Group

      public Group(K key)
  • 方法详细资料

    • iterator

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

      public void forEach(Consumer<? super V> action)
      指定者:
      forEach 在接口中 Iterable<K>
    • 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<K>
      参数:
      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.
    • getKey

      public K getKey()
    • toArray

      public V[] toArray(V[] arr)
      从接口复制的说明: FastStream
      Collects the stream into a T[].
      指定者:
      toArray 在接口中 FastStream<K>
      参数:
      arr - The template array to use. If the array is large enough to fit all elements in the stream, this will be used with a single null element after the last element.
      返回:
      The T[].