public class ImmutableStream
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static <T> java.util.stream.Stream<T> |
concat(java.util.stream.Stream<? extends T> x,
java.util.stream.Stream<? extends T> y)
Concatenation of two sets using their Stream API.
|
static <T> java.util.List<T> |
listCopyOf(java.util.stream.Stream<? extends T> stream)
Converts stream of objects into an immutable list.
|
static <K,V> java.util.Map<K,V> |
mapCopyOf(java.util.stream.Stream<? extends java.util.Map.Entry<? extends K,? extends V>> stream)
Converts a stream of Map.Entry objects into an immutable map.
|
static <T> java.util.Set<T> |
setCopyOf(java.util.stream.Stream<? extends T> stream)
Converts stream of object into an immutable set.
|
public static <T> java.util.List<T> listCopyOf(java.util.stream.Stream<? extends T> stream)
T - type parameterstream - stream of objectspublic static <T> java.util.stream.Stream<T> concat(java.util.stream.Stream<? extends T> x,
java.util.stream.Stream<? extends T> y)
T - type of element in a setx - first sety - second setpublic static <T> java.util.Set<T> setCopyOf(java.util.stream.Stream<? extends T> stream)
T - type parameterstream - stream of objectspublic static <K,V> java.util.Map<K,V> mapCopyOf(java.util.stream.Stream<? extends java.util.Map.Entry<? extends K,? extends V>> stream)
K - the output type of the key mapping functionV - the output type of the value mapping functionstream - stream of Map.Entry object.s