Package dev.crafty.core.util
Class Optionals
java.lang.Object
dev.crafty.core.util.Optionals
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
static interface
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
areAllPresent
(Optional<?>... optionals) static <A,
B> void ifAllPresent
(Optional<A> a, Optional<B> b, BiConsumer<A, B> consumer) static <A,
B, C> void ifAllPresent
(Optional<A> a, Optional<B> b, Optional<C> c, Optionals.TriConsumer<A, B, C> consumer) static <A,
B, C, D>
voidifAllPresent
(Optional<A> a, Optional<B> b, Optional<C> c, Optional<D> d, Optionals.QuadConsumer<A, B, C, D> consumer) static boolean
isOptionalTrue
(Optional<?> optional)
-
Constructor Details
-
Optionals
public Optionals()
-
-
Method Details
-
isOptionalTrue
-
ifAllPresent
-
ifAllPresent
public static <A,B, void ifAllPresentC> (Optional<A> a, Optional<B> b, Optional<C> c, Optionals.TriConsumer<A, B, C> consumer) -
ifAllPresent
public static <A,B, void ifAllPresentC, D> (Optional<A> a, Optional<B> b, Optional<C> c, Optional<D> d, Optionals.QuadConsumer<A, B, C, D> consumer) -
areAllPresent
-