Class NumberPredicate

    • Method Detail

      • isNotNull

        public static Predicate<Integer> isNotNull()
        Checks whether the actual value is present.
        Returns:
        Predicate to continue adding rules.
      • isNull

        public static Predicate<Integer> isNull()
        Checks whether the actual value is not present.
        Returns:
        Predicate to continue adding rules.
      • isEqualTo

        public static Predicate<Integer> isEqualTo​(int value)
        Check if the actual value is equal to the given one.
        Parameters:
        value - the exact expected value.
        Returns:
        Predicate to continue adding rules.
      • hasAmountOfDigits

        public static Predicate<Integer> hasAmountOfDigits​(int amountOfDigits)
        Parameters:
        amountOfDigits - the exact amount of digits of the Integer.
        Returns:
        Predicate to continue adding rules.
      • isBetween

        public static ConstraintAppender<Integer,​Predicate<Integer>> isBetween​(int first)
        Parameters:
        first - the first (inclusive) constraint. Can be either the high constraint or the low constraint.
        Returns:
        a ChainingPredicate to add the second constraint.
      • contains

        public static Predicate<Integer> contains​(Integer value,
                                                  Integer... values)
        Checks whether the given Integers are present anywhere in the value.
        Parameters:
        value - the exact value that needs to be present in the toString of the original value.
        values - the optional exact values that needs to be present in the toString of the original value.
        Returns:
        Predicate to continue adding rules.
      • doesNotContain

        public static Predicate<Integer> doesNotContain​(Integer value,
                                                        Integer... values)
        Checks whether the given Integers are not present anywhere in the value.
        Parameters:
        value - the exact value that may not be present in the toString of the original value.
        values - the optional exact values that may not be present in the toString of the original value.
        Returns:
        Predicate to continue adding rules.