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