public class AsStreamable
extends java.lang.Object
Constructor and Description |
---|
AsStreamable() |
Modifier and Type | Method and Description |
---|---|
static <T> Streamable<T> |
fromIterable(java.lang.Iterable<T> toCoerce) |
static <T> Streamable<T> |
fromObject(java.lang.Object toCoerce) |
static <T> Streamable<T> |
fromStream(java.util.stream.Stream<T> toCoerce) |
static <T> Streamable<T> |
synchronizedFromIterable(java.lang.Iterable<T> toCoerce) |
static <T> Streamable<T> |
synchronizedFromStream(java.util.stream.Stream<T> toCoerce) |
public static <T> Streamable<T> fromObject(java.lang.Object toCoerce)
public static <T> Streamable<T> fromStream(java.util.stream.Stream<T> toCoerce)
toCoerce
- Efficiently / lazily Makes Stream repeatable, not thread safe, on initial iterationpublic static <T> Streamable<T> fromIterable(java.lang.Iterable<T> toCoerce)
public static <T> Streamable<T> synchronizedFromStream(java.util.stream.Stream<T> toCoerce)
toCoerce
- Efficiently / lazily Makes Stream repeatable, guards iteration with locks on initial iterationpublic static <T> Streamable<T> synchronizedFromIterable(java.lang.Iterable<T> toCoerce)