public final class TypeResult<T> extends Object
| Modifier and Type | Method and Description |
|---|---|
static TypeResult<Class<?>> |
forClass(Class<?> clazz) |
static <T> TypeResult<T> |
forException(String name,
Throwable exception) |
static <V> TypeResult<V> |
forType(String name,
V type) |
T |
get() |
Throwable |
getException() |
T |
getOrFail() |
void |
ifPresent(Consumer<? super T> consumer) |
boolean |
isPresent() |
<U> TypeResult<U> |
map(Function<T,U> f) |
public static <V> TypeResult<V> forType(String name, V type)
public static TypeResult<Class<?>> forClass(Class<?> clazz)
public static <T> TypeResult<T> forException(String name, Throwable exception)
public boolean isPresent()
public T get()
public <U> TypeResult<U> map(Function<T,U> f)
public Throwable getException()
public T getOrFail()