com.compilit.validation.Definitions Maven / Gradle / Ivy
package com.compilit.validation;
import com.compilit.validation.api.RuleBuilder;
import java.util.function.BiPredicate;
import java.util.function.Predicate;
public final class Definitions {
private Definitions() {
}
/**
* Entry point for defining rules.
*
* @param predicate the predicate you wish to use for testing your value.
* @param the type of the value.
* @return a RuleBuilder to continue embellishing your rule.
*/
public static RuleBuilder defineThatIt(Predicate predicate) {
return new RuleDefinitionBuilder<>(predicate);
}
/**
* Entry point for defining rules with dual input.
*
* @param biPredicate the biPredicate you wish to use for testing your value.
* @param the type of the value.
* @return a RuleBuilder to continue embellishing your rule.
*/
public static RuleBuilder.WithDualInput defineThatIt(BiPredicate biPredicate) {
return new RuleDefinitionBuilder.WithDualInput<>(biPredicate);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy