Class DecimalNumberPredicate
- java.lang.Object
-
- org.solidcoding.validation.predicates.DecimalNumberPredicate
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPredicate(Predicate<Double> predicate)static DecimalNumberPredicatebeADecimalNumber()static DecimalNumberPredicatebeADecimalNumber(double value)static DecimalNumberPredicatebeADecimalNumber(Predicate<Double> rule)DecimalNumberConstraintPredicatebetween(double first)DecimalNumberPredicatecontaining(int number, int... numbers)Determines if the given numbers are present or a part of the actual decimal number.booleantest(Double value)
-
-
-
Method Detail
-
beADecimalNumber
public static DecimalNumberPredicate beADecimalNumber()
- Returns:
- DoublePredicate to continue adding rules.
-
beADecimalNumber
public static DecimalNumberPredicate beADecimalNumber(double value)
- Parameters:
value- the exact expected value.- Returns:
- DoublePredicate to continue adding rules.
-
beADecimalNumber
public static DecimalNumberPredicate beADecimalNumber(Predicate<Double> rule)
- Parameters:
rule- the custom predicate to test against the Double.- Returns:
- DoublePredicate to continue adding rules.
-
between
public DecimalNumberConstraintPredicate between(double first)
-
containing
public DecimalNumberPredicate containing(int number, int... numbers)
Determines if the given numbers are present or a part of the actual decimal number.- Parameters:
number- the integer that needs to be present in the decimal number.numbers- the optional numbers that need to be present in the decimal number.- Returns:
- DecimalNumberPredicate to continue adding rules.
-
-