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>
public class CompositeException extends Exception implements Iterable<Throwable>
TODO JavaDoc- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CompositeException()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <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)voidadd(Throwable throwable)voidadd(Collection<? extends Throwable> throwables)<T,U,R,X extends Exception>
Optional<R>apply(ThrowingBiFunction<T,U,R,X> function, T t, U u)<T,R,X extends Exception>
Optional<R>apply(ThrowingFunction<T,R,X> function, T t)<T> Optional<T>call(Callable<T> callable)<T,X extends Exception>
Optional<T>call(ThrowingCallable<T,X> callable)voidforEach(Consumer<? super Throwable> action)<T,X extends Exception>
Optional<T>get(ThrowingSupplier<T,X> supplier)List<Throwable>getExceptions()booleanhasExceptions()booleanisEmpty()Iterator<Throwable>iterator()<X extends Exception>
voidrun(ThrowingRunnable<X> runnable)intsize()Spliterator<Throwable>spliterator()Stream<Throwable>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)voidthrowIfNotEmpty()<X extends Throwable>
voidthrowIfNotEmpty(Function<? super CompositeException,X> factory)<T> Supplier<Optional<T>>wrapCallable(Callable<T> callable)<T,X extends Exception>
Supplier<Optional<T>>wrapCallable(ThrowingCallable<T,X> callable)<T,U,X extends Exception>
BiConsumer<T,U>wrapConsumer(ThrowingBiConsumer<T,U,X> consumer)<T,X extends Exception>
Consumer<T>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)<T,R,X extends Exception>
Function<T,Optional<R>>wrapFunction(ThrowingFunction<T,R,X> function)<T,X extends Exception>
Function<T,Optional<T>>wrapOperator(ThrowingUnaryOperator<T,X> operator)<T,U,X extends Exception>
BiPredicate<T,U>wrapPredicate(ThrowingBiPredicate<T,U,X> predicate, boolean defaultValue)<T,X extends Exception>
Predicate<T>wrapPredicate(ThrowingPredicate<T,X> predicate, boolean defaultValue)<X extends Exception>
RunnablewrapRunnable(ThrowingRunnable<X> runnable)<T,X extends Exception>
Supplier<Optional<T>>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
-
-
-
-
Method Detail
-
size
public int size()
-
add
public void add(Throwable throwable)
-
add
public void add(Collection<? extends Throwable> throwables)
-
isEmpty
public boolean isEmpty()
-
hasExceptions
public boolean hasExceptions()
-
throwIfNotEmpty
public void throwIfNotEmpty() throws CompositeException- Throws:
CompositeException
-
throwIfNotEmpty
public <X extends Throwable> void throwIfNotEmpty(Function<? super CompositeException,X> factory) throws X extends Throwable
- Throws:
X extends Throwable
-
throwCause
public <X extends Exception> void throwCause(Class<? extends X> type) throws X extends Exception
- Throws:
X extends Exception
-
spliterator
public Spliterator<Throwable> spliterator()
- Specified by:
spliteratorin interfaceIterable<Throwable>
-
wrapRunnable
public <X extends Exception> Runnable wrapRunnable(ThrowingRunnable<X> runnable)
-
wrapCallable
public <T,X extends Exception> Supplier<Optional<T>> wrapCallable(ThrowingCallable<T,X> callable)
-
wrapConsumer
public <T,X extends Exception> Consumer<T> wrapConsumer(ThrowingConsumer<T,X> consumer)
-
wrapConsumer
public <T,U,X extends Exception> BiConsumer<T,U> wrapConsumer(ThrowingBiConsumer<T,U,X> consumer)
-
wrapConsumer
public <A,B,C,X extends Exception> TriConsumer<A,B,C> wrapConsumer(ThrowingTriConsumer<A,B,C,X> consumer)
-
wrapFunction
public <T,R,X extends Exception> Function<T,Optional<R>> wrapFunction(ThrowingFunction<T,R,X> function)
-
wrapFunction
public <T,U,R,X extends Exception> BiFunction<T,U,Optional<R>> wrapFunction(ThrowingBiFunction<T,U,R,X> function)
-
wrapOperator
public <T,X extends Exception> Function<T,Optional<T>> wrapOperator(ThrowingUnaryOperator<T,X> operator)
-
wrapSupplier
public <T,X extends Exception> Supplier<Optional<T>> wrapSupplier(ThrowingSupplier<T,X> supplier)
-
wrapPredicate
public <T,X extends Exception> Predicate<T> wrapPredicate(ThrowingPredicate<T,X> predicate, boolean defaultValue)
-
wrapPredicate
public <T,U,X extends Exception> BiPredicate<T,U> wrapPredicate(ThrowingBiPredicate<T,U,X> predicate, boolean defaultValue)
-
run
public <X extends Exception> void run(ThrowingRunnable<X> runnable)
-
call
public <T,X extends Exception> Optional<T> call(ThrowingCallable<T,X> callable)
-
accept
public <T,X extends Exception> void accept(ThrowingConsumer<T,X> consumer, T t)
-
accept
public <T,U,X extends Exception> void accept(ThrowingBiConsumer<T,U,X> consumer, T t, U u)
-
accept
public <A,B,C,X extends Exception> void accept(ThrowingTriConsumer<A,B,C,X> consumer, A a, B b, C c)
-
apply
public <T,R,X extends Exception> Optional<R> apply(ThrowingFunction<T,R,X> function, T t)
-
apply
public <T,U,R,X extends Exception> Optional<R> apply(ThrowingBiFunction<T,U,R,X> function, T t, U u)
-
get
public <T,X extends Exception> Optional<T> get(ThrowingSupplier<T,X> supplier)
-
test
public <T,X extends Exception> boolean test(ThrowingPredicate<T,X> predicate, boolean defaultValue, T t)
-
test
public <T,U,X extends Exception> boolean test(ThrowingBiPredicate<T,U,X> predicate, boolean defaultValue, T t, U u)
-
-