Klasse LongMediator

java.lang.Object
ch.nolix.core.errorcontrol.validator.LongMediator
Bekannte direkte Unterklassen:
ExtendedLongMediator

public class LongMediator extends Object
A LongMediator is a Mediator for a long argument. A LongMediator is not mutable.
Version:
2017-01-01
Autor:
Silvan Wyss
  • Felddetails

  • Konstruktordetails

    • LongMediator

      protected LongMediator(long argument)
      Creates a new LongMediator for the given argument.
      Parameter:
      argument -
  • Methodendetails

    • forArgument

      public static LongMediator forArgument(long argument)
      Parameter:
      argument -
      Gibt zurück:
      a new LongMediator for the given argument.
    • forArgumentNameAndArgument

      public static LongMediator forArgumentNameAndArgument(String argumentName, long argument)
      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 current LongMediator 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 current LongMediator 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 current LongMediator 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 current LongMediator 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 current LongMediator does not equal the given value.
    • isEqualTo

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

      public final void isNegative()
      Löst aus:
      InvalidArgumentException - if the argument of the current LongMediator is not negative.
    • isNotBetween

      public final void isNotBetween(long min, long max)
      Parameter:
      min -
      max -
      Löst aus:
      InvalidArgumentException - if the argument of the current LongMediator 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 current LongMediator equals the given value.
    • isNotBiggerThan

      public final void isNotBiggerThan(int value)
      Parameter:
      value -
      Löst aus:
      BiggerArgumentException - if the argument of the current LongMediator is bigger than the given value.
    • isNotBiggerThan

      public final void isNotBiggerThan(long value)
      Parameter:
      value -
      Löst aus:
      BiggerArgumentException - if the argument of the current LongMediator is bigger than the given value.
    • isNotNegative

      public final void isNotNegative()
      Löst aus:
      NegativeArgumentException - if the argument of htis LongMediator is negative.
    • isNotPositive

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

      public final void isNotSmallerThan(int min)
      Parameter:
      min -
      Löst aus:
      SmallerArgumentException - if the argument of the current LongMediator is smaller than the * given min.
    • isPort

      public final void isPort()
      Löst aus:
      InvalidPortException - if the argument of the current LongMediator is not a port.
    • isPositive

      public final void isPositive()
      Löst aus:
      NonPositiveArgumentException - if the argument of the current LongMediator is not positive.
    • isSmallerThan

      public final void isSmallerThan(long value)
      Parameter:
      value -
      Löst aus:
      InvalidArgumentException - if the argument of the current LongMediator 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 current LongMediator 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

      protected final String getArgumentName()
      Gibt zurück:
      the argument name of the current Mediator.