Class AbstractObjectMediator<A>
java.lang.Object
ch.nolix.base.validation.base.AbstractMediator
ch.nolix.base.validation.object.AbstractObjectMediator<A>
- Type Parameters:
A- is the type of the argument of anAbstractObjectMediator.
- Direct Known Subclasses:
AbstractBigDecimalMediator, AbstractIterableMediator, AbstractTimeMediator, MethodMediator, NamableObjectMediator, ObjectMediator, OptionalMediator, StringMediator, TimeMediator, TypeMediator
- Author:
- Silvan Wyss
-
Field Summary
Fields inherited from class AbstractMediator
DEFAULT_ARGUMENT_NAME -
Method Summary
Modifier and TypeMethodDescriptionfinal voidfinal voidhasSameStringRepresentationAs(Object object) final voidhasStringRepresentation(String stringRepresentation) final voidfinal voidfinal voidfinal voidisNotEqualTo(A object) final voidfinal voidisNull()final void
-
Method Details
-
fulfills
- Parameters:
condition-- Throws:
RuntimeException- if the given condition is null.RuntimeException- if the argument of the currentAbstractObjectMediatordoes not fulfill the given condition.
-
hasSameStringRepresentationAs
- Parameters:
object-- Throws:
RuntimeException- if the given object is null.RuntimeException- if the argument of the currentAbstractObjectMediatordoes not have the sameStringrepresentation as the given object.
-
hasStringRepresentation
- Parameters:
stringRepresentation-- Throws:
RuntimeException- if the argument of the currentAbstractObjectMediatordoes not have the given stringRepresentation.
-
isEqualTo
- Parameters:
object-- Throws:
RuntimeException- if the argument of the currentAbstractObjectMediatordoes not equal the given object.
-
is
- Parameters:
object-- Throws:
RuntimeException- if the argument of the currentAbstractObjectMediatoris not (!) the given object.
-
isNot
- Parameters:
object-- Throws:
RuntimeException- if the argument of the currentAbstractObjectMediatoris the given object.
-
isNotEqualTo
- Parameters:
object-- Throws:
RuntimeException- if the argument of the currentAbstractObjectMediatorequals the given object.
-
isNotNull
public final void isNotNull()- Throws:
RuntimeException- if the argument of the currentAbstractObjectMediatoris null.
-
isNull
public final void isNull()- Throws:
ArgumentIsNotNullException- if the argument of the currentAbstractObjectMediatoris not (!) null.
-
isOfType
- Parameters:
type-- Throws:
RuntimeException- if the argument of the currentAbstractObjectMediatoris null.RuntimeException- if the argument of the currentAbstractObjectMediatoris not of the given type.
-