Klasse ArgumentMediator<A>
java.lang.Object
ch.nolix.core.errorcontrol.validator.ArgumentMediator<A>
- Typparameter:
A- is the type of the argument of anArgumentMediator.
- Bekannte direkte Unterklassen:
BigDecimalMediator,ExtendedArgumentMediator,IterableMediator,MethodMediator,OptionalMediator,StringMediator,TimeMediator,TypeMediator
A
ArgumentMediator is not mutable.- Version:
- 2017-01-01
- Autor:
- Silvan Wyss
-
Feldübersicht
Felder -
Konstruktorübersicht
KonstruktorenModifiziererKonstruktorBeschreibungprotectedArgumentMediator(A argument) Creates a newArgumentMediatorfor the given argument.protectedArgumentMediator(String argumentName, A argument) Creates a newArgumentMediatorfor the given argument, which has the given argumentName. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic <A2> ArgumentMediator<A2> forArgument(A2 argument) final voidprotected final Stringprotected Afinal voidhasSameStringRepresentationAs(Object object) final voidhasStringRepresentation(String stringRepresentation) final voidfinal voidfinal voidfinal voidisNotEqualTo(A object) final voidfinal voidisNull()final void
-
Felddetails
-
DEFAULT_ARGUMENT_NAME
- Siehe auch:
-
-
Konstruktordetails
-
ArgumentMediator
Creates a newArgumentMediatorfor the given argument.- Parameter:
argument-
-
ArgumentMediator
Creates a newArgumentMediatorfor the given argument, which has the given argumentName.- Parameter:
argumentName-argument-- Löst aus:
ArgumentIsNullException- if the given argumentName is null.InvalidArgumentException- if the given argument name is blank.
-
-
Methodendetails
-
forArgument
- Typparameter:
A2- is the type of the given argument.- Parameter:
argument-- Gibt zurück:
- a new
ArgumentMediatorfor the given argument.
-
fulfills
- Parameter:
condition-- Löst aus:
ArgumentIsNullException- if the given condition is null.InvalidArgumentException- if the argument of the currentArgumentMediatordoes not fulfill the given condition.
-
hasSameStringRepresentationAs
- Parameter:
object-- Löst aus:
ArgumentIsNullException- if the given object is null.InvalidArgumentException- if the argument of the currentArgumentMediatordoes not have the sameStringrepresentation as the given object.
-
hasStringRepresentation
- Parameter:
stringRepresentation-- Löst aus:
InvalidArgumentException- if the argument of the currentArgumentMediatordoes not have the given stringRepresentation.
-
isEqualTo
- Parameter:
object-- Löst aus:
InvalidArgumentException- if the argument of the currentArgumentMediatordoes not equal the given object.
-
is
- Parameter:
object-- Löst aus:
InvalidArgumentException- if the argument of the currentArgumentMediatoris not (!) the given object.
-
isNot
- Parameter:
object-- Löst aus:
InvalidArgumentException- if the argument of the currentArgumentMediatoris the given object.
-
isNotEqualTo
- Parameter:
object-- Löst aus:
InvalidArgumentException- if the argument of the currentArgumentMediatorequals the given object.
-
isNotNull
public final void isNotNull()- Löst aus:
ArgumentIsNullException- if the argument of the currentArgumentMediatoris null.
-
isNull
public final void isNull()- Löst aus:
ArgumentIsNotNullException- if the argument of the currentArgumentMediatoris not (!) null.
-
isOfType
- Parameter:
type-- Löst aus:
ArgumentIsNullException- if the argument of the currentArgumentMediatoris null.InvalidArgumentException- if the argument of the currentArgumentMediatoris not of the given type.
-
getStoredArgument
- Gibt zurück:
- the argument of the current
ArgumentMediator.
-
getArgumentName
- Gibt zurück:
- the argument name of the current
Mediator.
-