Class ReusableStream<T>

java.lang.Object
net.minecraft.util.collection.ReusableStream<T>

public class ReusableStream<T>
extends Object
A wrapper that automatically flattens the original stream and provides duplicates iterating a copy of that stream's output.
  • Field Details

    • collectedElements

      private final List<T> collectedElements
    • source

      private final Spliterator<T> source
  • Constructor Details

    • ReusableStream

      public ReusableStream​(Stream<T> stream)
  • Method Details

    • stream

      public Stream<T> stream()