Interface Stream.Builder<T>

All Superinterfaces:
Consumer<T>
Enclosing interface:
Stream<T>

public static interface Stream.Builder<T> extends Consumer<T>
java.util.stream.Stream.Builder: collects elements, then answers them as a stream, once.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    accept(T t)
    Performs this operation on t.
    default Stream.Builder<T>
    add(T t)
     
     

    Methods inherited from interface Consumer

    andThen
  • Method Details

    • accept

      void accept(T t)
      Description copied from interface: Consumer
      Performs this operation on t.
      Specified by:
      accept in interface Consumer<T>
      Parameters:
      t - the input
    • add

      default Stream.Builder<T> add(T t)
    • build

      Stream<T> build()