Package com.tngtech.archunit.base
Class Optional<T>
- java.lang.Object
-
- com.tngtech.archunit.base.Optional<T>
-
@PublicAPI(usage=ACCESS) public abstract class Optional<T> extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static <T> Optional<T>
absent()
abstract java.util.Set<T>
asSet()
static <T> Optional<T>
fromNullable(T object)
abstract T
get()
abstract T
getOrThrow(java.lang.RuntimeException e)
abstract boolean
isPresent()
static <T> Optional<T>
of(T object)
abstract Optional<T>
or(Optional<T> value)
abstract T
or(T value)
abstract T
orNull()
abstract <U> Optional<U>
transform(Function<? super T,U> function)
-
-
-
Method Detail
-
of
@PublicAPI(usage=ACCESS) public static <T> Optional<T> of(T object)
-
fromNullable
@PublicAPI(usage=ACCESS) public static <T> Optional<T> fromNullable(T object)
-
absent
@PublicAPI(usage=ACCESS) public static <T> Optional<T> absent()
-
isPresent
@PublicAPI(usage=ACCESS) public abstract boolean isPresent()
-
get
@PublicAPI(usage=ACCESS) public abstract T get()
-
getOrThrow
@PublicAPI(usage=ACCESS) public abstract T getOrThrow(java.lang.RuntimeException e)
-
transform
@PublicAPI(usage=ACCESS) public abstract <U> Optional<U> transform(Function<? super T,U> function)
-
orNull
@PublicAPI(usage=ACCESS) public abstract T orNull()
-
or
@PublicAPI(usage=ACCESS) public abstract T or(T value)
-
asSet
@PublicAPI(usage=ACCESS) public abstract java.util.Set<T> asSet()
-
-