Class AbstractLongMediator

java.lang.Object
ch.nolix.base.validation.base.AbstractMediator
ch.nolix.base.validation.primitive.AbstractLongMediator
Direct Known Subclasses:
LongMediator, NamableLongMediator

public abstract class AbstractLongMediator extends AbstractMediator
Author:
Silvan Wyss
  • Method Details

    • isBetween

      public final void isBetween(int min, int max)
      Parameters:
      min -
      max -
      Throws:
      RuntimeException - if the argument of the current LongMediator is 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 current LongMediator is not between the given min and max.
    • isBiggerThan

      public final void isBiggerThan(long value)
      Parameters:
      value -
      Throws:
      RuntimeException - if the argument of the current LongMediator is not bigger than the given value.
    • isBiggerThanOrEquals

      public final void isBiggerThanOrEquals(long value)
      Parameters:
      value -
      Throws:
      RuntimeException - if the argument of the current LongMediator is 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 current LongMediator does not equal the given value.
    • isEqualTo

      public final void isEqualTo(long value)
      Parameters:
      value -
      Throws:
      UnequalArgumentException - if the argument of the current LongMediator does 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 current LongMediator does not equal one of the given values.
    • isNegative

      public final void isNegative()
      Throws:
      RuntimeException - if the argument of the current LongMediator is not negative.
    • isNotBetween

      public final void isNotBetween(long min, long max)
      Parameters:
      min -
      max -
      Throws:
      RuntimeException - if the argument of the current LongMediator is between the given min and max.
    • isNotEqualTo

      public final void isNotEqualTo(long value)
      Parameters:
      value -
      Throws:
      RuntimeException - if the argument of the current LongMediator equals the given value.
    • isNotBiggerThan

      public final void isNotBiggerThan(int value)
      Parameters:
      value -
      Throws:
      RuntimeException - if the argument of the current LongMediator is bigger than the given value.
    • isNotBiggerThan

      public final void isNotBiggerThan(long value)
      Parameters:
      value -
      Throws:
      RuntimeException - if the argument of the current LongMediator is bigger than the given value.
    • isNotNegative

      public final void isNotNegative()
      Throws:
      RuntimeException - if the argument of htis LongMediator is negative.
    • isNotPositive

      public final void isNotPositive()
      Throws:
      PositiveArgumentException - if the argument of the current LongMediator is positive.
    • isNotSmallerThan

      public final void isNotSmallerThan(int min)
      Parameters:
      min -
      Throws:
      RuntimeException - if the argument of the current LongMediator is smaller than the given min.
    • isPort

      public final void isPort()
      Throws:
      RuntimeException - if the argument of the current LongMediator is not a port.
    • isPositive

      public final void isPositive()
      Throws:
      RuntimeException - if the argument of the current LongMediator is not positive.
    • isSmallerThan

      public final void isSmallerThan(long value)
      Parameters:
      value -
      Throws:
      RuntimeException - if the argument of the current LongMediator is not smaller than the given value.
    • isSmallerThanOrEquals

      public final void isSmallerThanOrEquals(long value)
      Parameters:
      value -
      Throws:
      RuntimeException - if the argument of the current LongMediator is not smaller than or does not equal the given value.