Class Java9StreamUtil

java.lang.Object
com.speedment.jpastreamer.javanine.Java9StreamUtil

public final class Java9StreamUtil extends Object
Author:
Per Minborg
  • Method Details

    • takeWhile

      public static DoubleStream takeWhile(DoubleStream stream, DoublePredicate predicate)
      Delegates a DoubleStream::takeWhile operation to the Java platforms underlying default Stream implementation. If run under Java 8, this method will throw an UnsupportedOperationException.
      Parameters:
      stream - to apply the takeWhile operation to
      predicate - to use for takeWhile
      Returns:
      a Stream where the takeWhile(predicate) has been applied
      Throws:
      UnsupportedOperationException - if run under Java 8
    • dropWhile

      public static DoubleStream dropWhile(DoubleStream stream, DoublePredicate predicate)
      Delegates a DoubleStream::dropWhile operation to the Java platforms underlying default Stream implementation. If run under Java 8, this method will throw an UnsupportedOperationException.
      Parameters:
      stream - to apply the dropWhile operation to
      predicate - to use for dropWhile
      Returns:
      a Stream where the dropWhile(predicate) has been applied
      Throws:
      UnsupportedOperationException - if run under Java 8
    • takeWhile

      public static IntStream takeWhile(IntStream stream, IntPredicate predicate)
      Delegates an IntStream::takeWhile operation to the Java platforms underlying default Stream implementation. If run under Java 8, this method will throw an UnsupportedOperationException.
      Parameters:
      stream - to apply the takeWhile operation to
      predicate - to use for takeWhile
      Returns:
      a Stream where the takeWhile(predicate) has been applied
      Throws:
      UnsupportedOperationException - if run under Java 8
    • dropWhile

      public static IntStream dropWhile(IntStream stream, IntPredicate predicate)
      Delegates an InteStream::dropWhile operation to the Java platforms underlying default Stream implementation. If run under Java 8, this method will throw an UnsupportedOperationException.
      Parameters:
      stream - to apply the dropWhile operation to
      predicate - to use for dropWhile
      Returns:
      a Stream where the dropWhile(predicate) has been applied
      Throws:
      UnsupportedOperationException - if run under Java 8
    • takeWhile

      public static LongStream takeWhile(LongStream stream, LongPredicate predicate)
      Delegates a LongStream::takeWhile operation to the Java platforms underlying default Stream implementation. If run under Java 8, this method will throw an UnsupportedOperationException.
      Parameters:
      stream - to apply the takeWhile operation to
      predicate - to use for takeWhile
      Returns:
      a Stream where the takeWhile(predicate) has been applied
      Throws:
      UnsupportedOperationException - if run under Java 8
    • dropWhile

      public static LongStream dropWhile(LongStream stream, LongPredicate predicate)
      Delegates a LongStream::dropWhile operation to the Java platforms underlying default Stream implementation. If run under Java 8, this method will throw an UnsupportedOperationException.
      Parameters:
      stream - to apply the dropWhile operation to
      predicate - to use for dropWhile
      Returns:
      a Stream where the dropWhile(predicate) has been applied
      Throws:
      UnsupportedOperationException - if run under Java 8
    • takeWhile

      public static <T> Stream<T> takeWhile(Stream<T> stream, Predicate<? super T> predicate)
      Delegates a Stream::takeWhile operation to the Java platforms underlying default Stream implementation. If run under Java 8, this method will throw an UnsupportedOperationException.
      Type Parameters:
      T - Element type in the Stream
      Parameters:
      stream - to apply the takeWhile operation to
      predicate - to use for takeWhile
      Returns:
      a Stream where the takeWhile(predicate) has been applied
      Throws:
      UnsupportedOperationException - if run under Java 8
    • dropWhile

      public static <T> Stream<T> dropWhile(Stream<T> stream, Predicate<? super T> predicate)
      Delegates a Stream::dropWhile operation to the Java platforms underlying default Stream implementation. If run under Java 8, this method will throw an UnsupportedOperationException.
      Type Parameters:
      T - Element type in the Stream
      Parameters:
      stream - to apply the dropWhile operation to
      predicate - to use for dropWhile
      Returns:
      a Stream where the dropWhile(predicate) has been applied
      Throws:
      UnsupportedOperationException - if run under Java 8