/** * Sets the cause which led to the exception to be built. * * @param causeSupplier supplier of the cause to be set. * @return this builder to allow method chaining. * @throws NullPointerException if {@code messageSupplier} is {@code null}. */ public DittoRuntimeExceptionBuilder<T> cause(final Supplier<Throwable> causeSupplier) { checkSupplier(causeSupplier); return cause(causeSupplier.get()); }
/** * Sets a description with further information about the exception to be built. * * @param descriptionSupplier supplier of the description to be set. * @return this builder to allow method chaining. * @throws NullPointerException if {@code messageSupplier} is {@code null}. */ public DittoRuntimeExceptionBuilder<T> description(final Supplier<String> descriptionSupplier) { checkSupplier(descriptionSupplier); return description(descriptionSupplier.get()); }
/** * Sets the cause which led to the exception to be built. * * @param causeSupplier supplier of the cause to be set. * @return this builder to allow method chaining. * @throws NullPointerException if {@code messageSupplier} is {@code null}. */ public DittoRuntimeExceptionBuilder<T> cause(final Supplier<Throwable> causeSupplier) { checkSupplier(causeSupplier); return cause(causeSupplier.get()); }
/** * Sets the detail message of the exception to be built. * * @param messageSupplier supplier of the message to be set. * @return this builder to allow method chaining. * @throws NullPointerException if {@code messageSupplier} is {@code null}. */ public DittoRuntimeExceptionBuilder<T> message(final Supplier<String> messageSupplier) { checkSupplier(messageSupplier); return message(messageSupplier.get()); }
/** * Sets a link to a resource which provides further information about the exception to be built. * * @param hrefSupplier supplier of the link to be set. * @return this builder to allow method chaining. * @throws NullPointerException if {@code messageSupplier} is {@code null}. */ public DittoRuntimeExceptionBuilder<T> href(final Supplier<URI> hrefSupplier) { checkSupplier(hrefSupplier); return href(hrefSupplier.get()); }
/** * Sets the detail message of the exception to be built. * * @param messageSupplier supplier of the message to be set. * @return this builder to allow method chaining. * @throws NullPointerException if {@code messageSupplier} is {@code null}. */ public DittoRuntimeExceptionBuilder<T> message(final Supplier<String> messageSupplier) { checkSupplier(messageSupplier); return message(messageSupplier.get()); }
/** * Sets a description with further information about the exception to be built. * * @param descriptionSupplier supplier of the description to be set. * @return this builder to allow method chaining. * @throws NullPointerException if {@code messageSupplier} is {@code null}. */ public DittoRuntimeExceptionBuilder<T> description(final Supplier<String> descriptionSupplier) { checkSupplier(descriptionSupplier); return description(descriptionSupplier.get()); }
/** * Sets a link to a resource which provides further information about the exception to be built. * * @param hrefSupplier supplier of the link to be set. * @return this builder to allow method chaining. * @throws NullPointerException if {@code messageSupplier} is {@code null}. */ public DittoRuntimeExceptionBuilder<T> href(final Supplier<URI> hrefSupplier) { checkSupplier(hrefSupplier); return href(hrefSupplier.get()); }