Class AbstractLongMediator
java.lang.Object
ch.nolix.base.validation.base.AbstractMediator
ch.nolix.base.validation.primitive.AbstractLongMediator
- Direct Known Subclasses:
LongMediator, NamableLongMediator
- Author:
- Silvan Wyss
-
Field Summary
Fields inherited from class AbstractMediator
DEFAULT_ARGUMENT_NAME -
Method Summary
Modifier and TypeMethodDescriptionfinal 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 voidisEqualToAnyOf(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)
-
Method Details
-
isBetween
public final void isBetween(int min, int max) - Parameters:
min-max-- Throws:
RuntimeException- if the argument of the currentLongMediatoris not between the given min and max.
-
isBetween
public final void isBetween(long min, long max) - Parameters:
min-max-- Throws:
RuntimeException- if the argument of the currentLongMediatoris not between the given min and max.
-
isBiggerThan
public final void isBiggerThan(long value) - Parameters:
value-- Throws:
RuntimeException- if the argument of the currentLongMediatoris not bigger than the given value.
-
isBiggerThanOrEquals
public final void isBiggerThanOrEquals(long value) - Parameters:
value-- Throws:
RuntimeException- if the argument of the currentLongMediatoris not bigger than or does not equal the given value.
-
isEqualTo
public final void isEqualTo(int value) - Parameters:
value-- Throws:
UnequalArgumentException- if the argument of the currentLongMediatordoes not equal the given value.
-
isEqualTo
public final void isEqualTo(long value) - Parameters:
value-- Throws:
UnequalArgumentException- if the argument of the currentLongMediatordoes not equal the given value.
-
isEqualToAnyOf
public final void isEqualToAnyOf(long... values) - Parameters:
values-- Throws:
RuntimeException- if the given values is null.RuntimeException- if the argument of the currentLongMediatordoes not equal one of the given values.
-
isNegative
public final void isNegative()- Throws:
RuntimeException- if the argument of the currentLongMediatoris not negative.
-
isNotBetween
public final void isNotBetween(long min, long max) - Parameters:
min-max-- Throws:
RuntimeException- if the argument of the currentLongMediatoris between the given min and max.
-
isNotEqualTo
public final void isNotEqualTo(long value) - Parameters:
value-- Throws:
RuntimeException- if the argument of the currentLongMediatorequals the given value.
-
isNotBiggerThan
public final void isNotBiggerThan(int value) - Parameters:
value-- Throws:
RuntimeException- if the argument of the currentLongMediatoris bigger than the given value.
-
isNotBiggerThan
public final void isNotBiggerThan(long value) - Parameters:
value-- Throws:
RuntimeException- if the argument of the currentLongMediatoris bigger than the given value.
-
isNotNegative
public final void isNotNegative()- Throws:
RuntimeException- if the argument of htisLongMediatoris negative.
-
isNotPositive
public final void isNotPositive()- Throws:
PositiveArgumentException- if the argument of the currentLongMediatoris positive.
-
isNotSmallerThan
public final void isNotSmallerThan(int min) - Parameters:
min-- Throws:
RuntimeException- if the argument of the currentLongMediatoris smaller than the given min.
-
isPort
public final void isPort()- Throws:
RuntimeException- if the argument of the currentLongMediatoris not a port.
-
isPositive
public final void isPositive()- Throws:
RuntimeException- if the argument of the currentLongMediatoris not positive.
-
isSmallerThan
public final void isSmallerThan(long value) - Parameters:
value-- Throws:
RuntimeException- if the argument of the currentLongMediatoris not smaller than the given value.
-
isSmallerThanOrEquals
public final void isSmallerThanOrEquals(long value) - Parameters:
value-- Throws:
RuntimeException- if the argument of the currentLongMediatoris not smaller than or does not equal the given value.
-