Package org.n52.janmayen.exception
Class CompositeException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.n52.janmayen.exception.CompositeException
- All Implemented Interfaces:
Serializable,Iterable<Throwable>
TODO JavaDoc
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T,U, X extends Exception>
voidaccept(ThrowingBiConsumer<T, U, X> consumer, T t, U u) <T,X extends Exception>
voidaccept(ThrowingConsumer<T, X> consumer, T t) <A,B, C, X extends Exception>
voidaccept(ThrowingTriConsumer<A, B, C, X> consumer, A a, B b, C c) voidvoidadd(Collection<? extends Throwable> throwables) apply(ThrowingBiFunction<T, U, R, X> function, T t, U u) apply(ThrowingFunction<T, R, X> function, T t) <T> Optional<T> call(ThrowingCallable<T, X> callable) voidget(ThrowingSupplier<T, X> supplier) booleanbooleanisEmpty()iterator()<X extends Exception>
voidrun(ThrowingRunnable<X> runnable) intsize()stream()<T,U, X extends Exception>
booleantest(ThrowingBiPredicate<T, U, X> predicate, boolean defaultValue, T t, U u) <T,X extends Exception>
booleantest(ThrowingPredicate<T, X> predicate, boolean defaultValue, T t) <X extends Exception>
voidthrowCause(Class<? extends X> type) void<X extends Throwable>
voidthrowIfNotEmpty(Function<? super CompositeException, X> factory) wrapCallable(Callable<T> callable) wrapCallable(ThrowingCallable<T, X> callable) <T,U, X extends Exception>
BiConsumer<T, U> wrapConsumer(ThrowingBiConsumer<T, U, X> consumer) wrapConsumer(ThrowingConsumer<T, X> consumer) <A,B, C, X extends Exception>
TriConsumer<A, B, C> wrapConsumer(ThrowingTriConsumer<A, B, C, X> consumer) <T,U, R, X extends Exception>
BiFunction<T, U, Optional<R>> wrapFunction(ThrowingBiFunction<T, U, R, X> function) wrapFunction(ThrowingFunction<T, R, X> function) wrapOperator(ThrowingUnaryOperator<T, X> operator) <T,U, X extends Exception>
BiPredicate<T, U> wrapPredicate(ThrowingBiPredicate<T, U, X> predicate, boolean defaultValue) wrapPredicate(ThrowingPredicate<T, X> predicate, boolean defaultValue) wrapRunnable(ThrowingRunnable<X> runnable) wrapSupplier(ThrowingSupplier<T, X> supplier) Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
CompositeException
public CompositeException()
-
-
Method Details
-
getExceptions
-
size
public int size() -
stream
-
add
-
add
-
isEmpty
public boolean isEmpty() -
hasExceptions
public boolean hasExceptions() -
throwIfNotEmpty
- Throws:
CompositeException
-
throwIfNotEmpty
public <X extends Throwable> void throwIfNotEmpty(Function<? super CompositeException, X> factory) throws X- Throws:
X
-
throwCause
- Throws:
X
-
iterator
-
forEach
-
spliterator
- Specified by:
spliteratorin interfaceIterable<Throwable>
-
wrapRunnable
-
wrapCallable
-
wrapCallable
-
wrapConsumer
-
wrapConsumer
-
wrapConsumer
public <A,B, TriConsumer<A,C, X extends Exception> B, wrapConsumerC> (ThrowingTriConsumer<A, B, C, X> consumer) -
wrapFunction
public <T,R, Function<T,X extends Exception> Optional<R>> wrapFunction(ThrowingFunction<T, R, X> function) -
wrapFunction
public <T,U, BiFunction<T,R, X extends Exception> U, wrapFunctionOptional<R>> (ThrowingBiFunction<T, U, R, X> function) -
wrapOperator
public <T,X extends Exception> Function<T,Optional<T>> wrapOperator(ThrowingUnaryOperator<T, X> operator) -
wrapSupplier
-
wrapPredicate
public <T,X extends Exception> Predicate<T> wrapPredicate(ThrowingPredicate<T, X> predicate, boolean defaultValue) -
wrapPredicate
public <T,U, BiPredicate<T,X extends Exception> U> wrapPredicate(ThrowingBiPredicate<T, U, X> predicate, boolean defaultValue) -
run
-
call
-
call
-
accept
-
accept
-
accept
public <A,B, void acceptC, X extends Exception> (ThrowingTriConsumer<A, B, C, X> consumer, A a, B b, C c) -
apply
-
apply
public <T,U, Optional<R> applyR, X extends Exception> (ThrowingBiFunction<T, U, R, X> function, T t, U u) -
get
-
test
public <T,X extends Exception> boolean test(ThrowingPredicate<T, X> predicate, boolean defaultValue, T t) -
test
public <T,U, boolean testX extends Exception> (ThrowingBiPredicate<T, U, X> predicate, boolean defaultValue, T t, U u)
-