public abstract class BuilderUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T> void |
assertNonNull(T value,
String exceptionMessage)
Assert that the given
value is non null. |
static void |
assertPositive(int integer,
String exceptionMessage)
Assert that the given
value is positive, meaning greater than, or equal to, zero. |
static void |
assertStrictPositive(int integer,
String exceptionMessage)
Assert that the given
value is strictly positive, meaning greater than zero. |
static <T> void |
assertThat(T value,
Predicate<T> assertion,
String exceptionMessage)
|
public static <T> void assertThat(T value,
Predicate<T> assertion,
String exceptionMessage)
throws AxonConfigurationException
value will result to true through the assertion Predicate.
If not, an AxonConfigurationException is thrown containing the provided exceptionMessage.T - a generic specifying the type of the value, which is the input for the
assertionvalue - a T specifying the value to assertassertion - a Predicate to test value againstexceptionMessage - The message for the exception.AxonConfigurationException - if the value asserts to false by the assertionpublic static <T> void assertNonNull(T value,
String exceptionMessage)
throws AxonConfigurationException
value is non null. If not, an AxonConfigurationException is thrown
containing the provided exceptionMessage.T - a generic specifying the type of the value, which is the input for the
assertionvalue - a T specifying the value to assertexceptionMessage - The message for the exception.AxonConfigurationException - if the value equals nullpublic static void assertPositive(int integer,
String exceptionMessage)
value is positive, meaning greater than, or equal to, zero. If not, an
AxonConfigurationException is thrown containing the provided {code exceptionMessage}.integer - the value to assertexceptionMessage - the message for the exceptionpublic static void assertStrictPositive(int integer,
String exceptionMessage)
value is strictly positive, meaning greater than zero. If not, an
AxonConfigurationException is thrown containing the provided {code exceptionMessage}.integer - the value to assertexceptionMessage - the message for the exception.Copyright © 2010–2019. All rights reserved.