/** * Builds a {@link PrimitiveTypeRule} that evaluates the specified {@link Predicate} against the * primitive value with trailing whitespaces trimmed. * * @param predicate predicate to evaluate the primitive value against * * @return this instance to build more rules */ public PrimitiveRuleBuilder rightTrim(Predicate predicate) { return test(prepareRule(new PredicatePrimitiveTypeRule(predicate, Trimmer.RIGHT))); }
/** * Builds a {@link PrimitiveTypeRule} that evaluates the specified {@link Predicate} against the * primitive value with leading whitespaces trimmed. * * @param predicate predicate to evaluate the primitive value against * * @return this instance to build more rules */ public PrimitiveRuleBuilder leftTrim(Predicate predicate) { return test(prepareRule(new PredicatePrimitiveTypeRule(predicate, Trimmer.LEFT))); }
/** * Builds a {@link PrimitiveTypeRule} that evaluates the specified {@link Predicate} against the * primitive value with leading whitespaces trimmed. * * @param predicate predicate to evaluate the primitive value against * * @return this instance to build more rules */ public PrimitiveRuleBuilder leftTrim(Predicate predicate) { return test(prepareRule(new PredicatePrimitiveTypeRule(predicate, Trimmer.LEFT))); }
/** * Builds a {@link PrimitiveTypeRule} that evaluates the specified {@link Predicate} against the * primitive value. * * @param predicate predicate to evaluate the primitive value against * * @return this instance to build more rules */ public PrimitiveRuleBuilder is(Predicate predicate) { return test(prepareRule(new PredicatePrimitiveTypeRule(predicate))); }
/** * Builds a {@link PrimitiveTypeRule} that evaluates the specified {@link Predicate} against the * primitive value with trailing whitespaces trimmed. * * @param predicate predicate to evaluate the primitive value against * * @return this instance to build more rules */ public PrimitiveRuleBuilder rightTrim(Predicate predicate) { return test(prepareRule(new PredicatePrimitiveTypeRule(predicate, Trimmer.RIGHT))); }
/** * Builds a {@link PrimitiveTypeRule} that evaluates the specified {@link Predicate} against the * primitive value with leading and trailing whitespaces trimmed. * * @param predicate predicate to evaluate the primitive value against * * @return this instance to build more rules */ public PrimitiveRuleBuilder allTrim(Predicate predicate) { return test(prepareRule(new PredicatePrimitiveTypeRule(predicate, Trimmer.ALL))); }
/** * Builds a {@link PrimitiveTypeRule} that evaluates the specified {@link Predicate} against the * primitive value. * * @param predicate predicate to evaluate the primitive value against * * @return this instance to build more rules */ public PrimitiveRuleBuilder is(Predicate predicate) { return test(prepareRule(new PredicatePrimitiveTypeRule(predicate))); }
/** * Builds a {@link PrimitiveTypeRule} that evaluates the specified {@link Predicate} against the * primitive value with leading and trailing whitespaces trimmed. * * @param predicate predicate to evaluate the primitive value against * * @return this instance to build more rules */ public PrimitiveRuleBuilder allTrim(Predicate predicate) { return test(prepareRule(new PredicatePrimitiveTypeRule(predicate, Trimmer.ALL))); }