Klasse LongMediator
java.lang.Object
ch.nolix.core.errorcontrol.validator.LongMediator
- Bekannte direkte Unterklassen:
ExtendedLongMediator
- Version:
- 2017-01-01
- Autor:
- Silvan Wyss
-
Feldübersicht
-
Konstruktorübersicht
ModifiziererKonstruktorBeschreibungprotected
LongMediator
(long argument) Creates a newLongMediator
for the given argument. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic LongMediator
forArgument
(long argument) static LongMediator
forArgumentNameAndArgument
(String argumentName, long argument) protected final long
protected final String
final void
isBetween
(int min, int max) final void
isBetween
(long min, long max) final void
isBiggerThan
(long value) final void
isBiggerThanOrEquals
(long value) final void
isEqualTo
(int value) final void
isEqualTo
(long value) final void
isEqualToAny
(long value, long... values) final void
final void
isNotBetween
(long min, long max) final void
isNotBiggerThan
(int value) final void
isNotBiggerThan
(long value) final void
isNotEqualTo
(long value) final void
final void
final void
isNotSmallerThan
(int min) final void
isPort()
final void
final void
isSmallerThan
(long value) final void
isSmallerThanOrEquals
(long value)
-
Felddetails
-
DEFAULT_ARGUMENT_NAME
- Siehe auch:
-
-
Konstruktordetails
-
LongMediator
protected LongMediator(long argument) Creates a newLongMediator
for the given argument.- Parameter:
argument
-
-
-
Methodendetails
-
forArgument
- Parameter:
argument
-- Gibt zurück:
- a new
LongMediator
for the given argument.
-
forArgumentNameAndArgument
- Parameter:
argumentName
-argument
-- Gibt zurück:
- a new
LongMediator
for 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 currentLongMediator
is 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 currentLongMediator
is 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 currentLongMediator
is not bigger than the given value.
-
isBiggerThanOrEquals
public final void isBiggerThanOrEquals(long value) - Parameter:
value
-- Löst aus:
SmallerArgumentException
- if the argument of the currentLongMediator
is 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 currentLongMediator
does not equal the given value.
-
isEqualTo
public final void isEqualTo(long value) - Parameter:
value
-- Löst aus:
UnequalArgumentException
- if the argument of the currentLongMediator
does 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 currentLongMediator
does not equal one of the given values.
-
isNegative
public final void isNegative()- Löst aus:
InvalidArgumentException
- if the argument of the currentLongMediator
is not negative.
-
isNotBetween
public final void isNotBetween(long min, long max) - Parameter:
min
-max
-- Löst aus:
InvalidArgumentException
- if the argument of the currentLongMediator
is between the given min and max.
-
isNotEqualTo
public final void isNotEqualTo(long value) - Parameter:
value
-- Löst aus:
EqualArgumentException
- if the argument of the currentLongMediator
equals the given value.
-
isNotBiggerThan
public final void isNotBiggerThan(int value) - Parameter:
value
-- Löst aus:
BiggerArgumentException
- if the argument of the currentLongMediator
is bigger than the given value.
-
isNotBiggerThan
public final void isNotBiggerThan(long value) - Parameter:
value
-- Löst aus:
BiggerArgumentException
- if the argument of the currentLongMediator
is bigger than the given value.
-
isNotNegative
public final void isNotNegative()- Löst aus:
NegativeArgumentException
- if the argument of htisLongMediator
is negative.
-
isNotPositive
public final void isNotPositive()- Löst aus:
PositiveArgumentException
- if the argument of the currentLongMediator
is positive.
-
isNotSmallerThan
public final void isNotSmallerThan(int min) - Parameter:
min
-- Löst aus:
SmallerArgumentException
- if the argument of the currentLongMediator
is smaller than the * given min.
-
isPort
public final void isPort()- Löst aus:
InvalidPortException
- if the argument of the currentLongMediator
is not a port.
-
isPositive
public final void isPositive()- Löst aus:
NonPositiveArgumentException
- if the argument of the currentLongMediator
is not positive.
-
isSmallerThan
public final void isSmallerThan(long value) - Parameter:
value
-- Löst aus:
InvalidArgumentException
- if the argument of the currentLongMediator
is not smaller than the given value.
-
isSmallerThanOrEquals
public final void isSmallerThanOrEquals(long value) - Parameter:
value
-- Löst aus:
BiggerArgumentException
- if the argument of the currentLongMediator
is 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
.
-