public class PluginDefaultGroovyMethods
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static boolean |
asBoolean(java.util.Optional<?> optional)
Coerce an Optional instance to a boolean value.
|
static <T> java.util.List<T> |
toList(java.util.stream.Stream<T> stream)
Accumulates the elements of stream into a new List.
|
static <T> java.util.Set<T> |
toSet(java.util.stream.Stream<T> stream)
Accumulates the elements of stream into a new Set.
|
public static boolean asBoolean(java.util.Optional<?> optional)
optional - the Optionaltrue if a value is present, otherwise falsepublic static <T> java.util.List<T> toList(java.util.stream.Stream<T> stream)
T - stream - the Streamjava.util.List instancepublic static <T> java.util.Set<T> toSet(java.util.stream.Stream<T> stream)
T - stream - the Streamjava.util.Set instance