Class NumberPredicate

    • Method Detail

      • beANumber

        public static NumberPredicate beANumber()
        Returns:
        IntegerPredicate to continue adding rules.
      • beANumber

        public static NumberPredicate beANumber​(int value)
        Parameters:
        value - the exact expected value.
        Returns:
        IntegerPredicate to continue adding rules.
      • beANumber

        public static NumberPredicate beANumber​(Predicate<Integer> rule)
        Parameters:
        rule - the custom predicate to test against the Integer.
        Returns:
        IntegerPredicate to continue adding rules.
      • beANumberOfLength

        public static NumberPredicate beANumberOfLength​(int amountOfDigits)
        Parameters:
        amountOfDigits - the exact amount of digits of the Integer.
        Returns:
        IntegerPredicate to continue adding rules.
      • containing

        public NumberPredicate containing​(int integer,
                                          int... integers)
        Determines if the given integers are present or a part of the actual Integer.
        Parameters:
        integer - the integer that needs to be present in the Integer.
        integers - the optional integers that need to be present in the Integer.
        Returns:
        IntegerPredicate to continue adding rules.