@FunctionalInterface public interface Function0<U> extends Supplier<U>, Callable<U>
| Modifier and Type | Interface and Description |
|---|---|
static class |
Function0.Const |
static class |
Function0.Constant<K>
Wraps a value in a constant function.
|
| Modifier and Type | Field and Description |
|---|---|
static Function0<Object> |
NULL
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
default U |
apply()
The class that takes a consumer as an argument uses this convenience method so that it
doesn't have to worry about checked exceptions either.
|
U |
applyEx()
Implement this one method and you don't have to worry about checked exceptions.
|
default U |
call() |
static <K> Function0<K> |
constantFunction(K k) |
default U |
get() |
@Deprecated static final Function0<Object> NULL
Function0.Const.NULL instead because it's serializable.U applyEx() throws Exception
Exceptiondefault U apply()
static <K> Function0<K> constantFunction(K k)
Copyright © 2017. All rights reserved.