Class NamableObjectMediator<A>
java.lang.Object
ch.nolix.base.validation.base.AbstractMediator
ch.nolix.base.validation.object.AbstractObjectMediator<A>
ch.nolix.base.validation.object.NamableObjectMediator<A>
- Type Parameters:
A- is the type of the argument of aNamableObjectMediator.
- Author:
- Silvan Wyss
-
Field Summary
Fields inherited from class AbstractMediator
DEFAULT_ARGUMENT_NAME -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> NamableObjectMediator<T> forArgument(T argument) thatIsNamed(Class<?> type) thatIsNamed(String argumentName) Methods inherited from class AbstractObjectMediator
fulfills, hasSameStringRepresentationAs, hasStringRepresentation, is, isEqualTo, isNot, isNotEqualTo, isNotNull, isNull, isOfType
-
Method Details
-
forArgument
- Type Parameters:
T- is the type of the given argument.- Parameters:
argument-- Returns:
- a new
NamableObjectMediatorfor the given argument.
-
thatIsNamed
- Parameters:
type-- Returns:
- a new
ObjectMediatorfor the argument of the current @link NamableObjectMediator} and the argument name from the given type. - Throws:
RuntimeException- if the given type is null.
-
thatIsNamed
- Parameters:
argumentName-- Returns:
- a new
ObjectMediatorfor the argument of the currentNamableObjectMediatorand the given argumentName. - Throws:
RuntimeException- if the given argumentName is null or blank.
-