Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package fluentconditionals;
- import java.util.function.Consumer;
- import java.util.function.Function;
- import java.util.function.Supplier;
- public interface Conditional {
- Conditional then(Runnable object);
- Conditional then(Consumer<String> stringSupplier);
- void orElse(Runnable object);
- void orElse(Consumer<String> stringSupplier);
- void orElseThrow(Supplier<RuntimeException> exceptionSupplier);
- void orElseThrowE(RuntimeException exception);
- <T> ReturnObject<T> thenReturn(Supplier<T> object);
- <T> ReturnObject<T> thenReturn(T object);
- <R> ReturnObject<R> thenReturn(Function<String, R> function);
- Conditional when(boolean condition);
- Conditional when(Supplier<Boolean> condition);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement