Class StreamUtilities
- java.lang.Object
-
- com.salesforce.datacloud.jdbc.util.StreamUtilities
-
public final class StreamUtilities extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> Stream<T>lazyLimitedStream(Supplier<Stream<T>> streamSupplier, LongSupplier limitSupplier)static <T> Stream<T>toStream(Iterator<T> iterator)static <T,E extends Exception>
Optional<T>tryTimes(int times, ThrowingSupplier<T,E> attempt, Consumer<Throwable> consumer)
-
-
-
Method Detail
-
lazyLimitedStream
public static <T> Stream<T> lazyLimitedStream(Supplier<Stream<T>> streamSupplier, LongSupplier limitSupplier)
-
tryTimes
public static <T,E extends Exception> Optional<T> tryTimes(int times, ThrowingSupplier<T,E> attempt, Consumer<Throwable> consumer)
-
-