Klasse LongMediator
java.lang.Object
ch.nolix.core.errorcontrol.validator.LongMediator
- Bekannte direkte Unterklassen:
ExtendedLongMediator
- Version:
- 2017-01-01
- Autor:
- Silvan Wyss
-
Feldübersicht
Felder -
Konstruktorübersicht
KonstruktorenModifiziererKonstruktorBeschreibungprotectedLongMediator(long argument) Creates a newLongMediatorfor the given argument. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic LongMediatorforArgument(long argument) static LongMediatorforArgumentNameAndArgument(String argumentName, long argument) protected final longprotected final Stringfinal voidisBetween(int min, int max) final voidisBetween(long min, long max) final voidisBiggerThan(long value) final voidisBiggerThanOrEquals(long value) final voidisEqualTo(int value) final voidisEqualTo(long value) final voidisEqualToAny(long value, long... values) final voidfinal voidisNotBetween(long min, long max) final voidisNotBiggerThan(int value) final voidisNotBiggerThan(long value) final voidisNotEqualTo(long value) final voidfinal voidfinal voidisNotSmallerThan(int min) final voidisPort()final voidfinal voidisSmallerThan(long value) final voidisSmallerThanOrEquals(long value)
-
Felddetails
-
DEFAULT_ARGUMENT_NAME
- Siehe auch:
-
-
Konstruktordetails
-
LongMediator
protected LongMediator(long argument) Creates a newLongMediatorfor the given argument.- Parameter:
argument-
-
-
Methodendetails
-
forArgument
- Parameter:
argument-- Gibt zurück:
- a new
LongMediatorfor the given argument.
-
forArgumentNameAndArgument
- Parameter:
argumentName-argument-- Gibt zurück:
- a new
LongMediatorfor the given argumentName and argument. - Löst aus:
ArgumentIsNullException- if the given argumentName is null.InvalidArgumentException- if the given argumentName is blank.
-
isBetween
public final void isBetween(int min, int max) - Parameter:
min-max-- Löst aus:
ArgumentIsOutOfRangeException- if the argument of the currentLongMediatoris not between the given min and max.
-
isBetween
public final void isBetween(long min, long max) - Parameter:
min-max-- Löst aus:
ArgumentIsOutOfRangeException- if the argument of the currentLongMediatoris not between the given min and max.
-
isBiggerThan
public final void isBiggerThan(long value) - Parameter:
value-- Löst aus:
InvalidArgumentException- if the argument of the currentLongMediatoris not bigger than the given value.
-
isBiggerThanOrEquals
public final void isBiggerThanOrEquals(long value) - Parameter:
value-- Löst aus:
SmallerArgumentException- if the argument of the currentLongMediatoris not bigger than or does not equal the given value.
-
isEqualTo
public final void isEqualTo(int value) - Parameter:
value-- Löst aus:
UnequalArgumentException- if the argument of the currentLongMediatordoes not equal the given value.
-
isEqualTo
public final void isEqualTo(long value) - Parameter:
value-- Löst aus:
UnequalArgumentException- if the argument of the currentLongMediatordoes not equal the given value.
-
isEqualToAny
public final void isEqualToAny(long value, long... values) - Parameter:
value-values-- Löst aus:
InvalidArgumentException- if the argument of the currentLongMediatordoes not equal one of the given values.
-
isNegative
public final void isNegative()- Löst aus:
InvalidArgumentException- if the argument of the currentLongMediatoris not negative.
-
isNotBetween
public final void isNotBetween(long min, long max) - Parameter:
min-max-- Löst aus:
InvalidArgumentException- if the argument of the currentLongMediatoris between the given min and max.
-
isNotEqualTo
public final void isNotEqualTo(long value) - Parameter:
value-- Löst aus:
EqualArgumentException- if the argument of the currentLongMediatorequals the given value.
-
isNotBiggerThan
public final void isNotBiggerThan(int value) - Parameter:
value-- Löst aus:
BiggerArgumentException- if the argument of the currentLongMediatoris bigger than the given value.
-
isNotBiggerThan
public final void isNotBiggerThan(long value) - Parameter:
value-- Löst aus:
BiggerArgumentException- if the argument of the currentLongMediatoris bigger than the given value.
-
isNotNegative
public final void isNotNegative()- Löst aus:
NegativeArgumentException- if the argument of htisLongMediatoris negative.
-
isNotPositive
public final void isNotPositive()- Löst aus:
PositiveArgumentException- if the argument of the currentLongMediatoris positive.
-
isNotSmallerThan
public final void isNotSmallerThan(int min) - Parameter:
min-- Löst aus:
SmallerArgumentException- if the argument of the currentLongMediatoris smaller than the * given min.
-
isPort
public final void isPort()- Löst aus:
InvalidPortException- if the argument of the currentLongMediatoris not a port.
-
isPositive
public final void isPositive()- Löst aus:
NonPositiveArgumentException- if the argument of the currentLongMediatoris not positive.
-
isSmallerThan
public final void isSmallerThan(long value) - Parameter:
value-- Löst aus:
InvalidArgumentException- if the argument of the currentLongMediatoris not smaller than the given value.
-
isSmallerThanOrEquals
public final void isSmallerThanOrEquals(long value) - Parameter:
value-- Löst aus:
BiggerArgumentException- if the argument of the currentLongMediatoris not smaller than or does not equal the given value.
-
getArgument
protected final long getArgument()- Gibt zurück:
- the argument of the current
LongMediator.
-
getArgumentName
- Gibt zurück:
- the argument name of the current
Mediator.
-