public class StreamOps extends Object
| Constructor and Description |
|---|
StreamOps() |
| Modifier and Type | Method and Description |
|---|---|
static <X> X |
element(Collection<X> collection)
An element from a
Collection |
static <X> X |
first(Stream<X> stream)
First element or null
|
static <X> Stream<X> |
print(Stream<X> stream)
Debug : print stream.
|
static <X> Stream<X> |
stream(Iterator<X> iter)
Iterator to Stream.
|
static <X> List<X> |
toList(Stream<X> stream)
Stream to
List |
static <X> Set<X> |
toSet(Stream<X> stream)
Stream to
Set |
public static <X> Stream<X> stream(Iterator<X> iter)
public static <X> X first(Stream<X> stream)
public static <X> X element(Collection<X> collection)
CollectionLicenced under the Apache License, Version 2.0