/** * An individual predicate in a contract. * * @param <T> The type of input values */ @Value.Immutable @AffirmImmutableStyleType public interface ContractConditionType<T> { /** * @return A predicate that must evaluate to {@code true} for the contract to * hold */ @Value.Parameter(order = 0) Predicate<T> predicate(); /** * @return A function that returns a textual description of the predicate */ @Value.Parameter(order = 1) Function<T, String> describer(); }
/** * A {@code double} specialized version of the {@link ContractConditionType} * type. */ @Value.Immutable @AffirmImmutableStyleType public interface ContractDoubleConditionType { /** * @return A predicate that must evaluate to {@code true} for the contract to * hold */ @Value.Parameter(order = 0) DoublePredicate predicate(); /** * @return A function that returns a textual description of the predicate */ @Value.Parameter(order = 1) DoubleFunction<String> describer(); }
/** * A {@code long} specialized version of the {@link ContractConditionType} * type. */ @Value.Immutable @AffirmImmutableStyleType public interface ContractLongConditionType { /** * @return A predicate that must evaluate to {@code true} for the contract to * hold */ @Value.Parameter(order = 0) LongPredicate predicate(); /** * @return A function that returns a textual description of the predicate */ @Value.Parameter(order = 1) LongFunction<String> describer(); }
/** * A {@code long} specialized version of the {@link ContractConditionType} * type. */ @Value.Immutable @AffirmImmutableStyleType public interface ContractLongConditionType { /** * @return A predicate that must evaluate to {@code true} for the contract to * hold */ @Value.Parameter(order = 0) LongPredicate predicate(); /** * @return A function that returns a textual description of the predicate */ @Value.Parameter(order = 1) LongFunction<String> describer(); }
/** * An {@code int} specialized version of the {@link ContractConditionType} * type. */ @Value.Immutable @AffirmImmutableStyleType public interface ContractIntConditionType { /** * @return A predicate that must evaluate to {@code true} for the contract to * hold */ @Value.Parameter(order = 0) IntPredicate predicate(); /** * @return A function that returns a textual description of the predicate */ @Value.Parameter(order = 1) IntFunction<String> describer(); }
/** * A {@code double} specialized version of the {@link ContractConditionType} * type. */ @Value.Immutable @AffirmImmutableStyleType public interface ContractDoubleConditionType { /** * @return A predicate that must evaluate to {@code true} for the contract to * hold */ @Value.Parameter(order = 0) DoublePredicate predicate(); /** * @return A function that returns a textual description of the predicate */ @Value.Parameter(order = 1) DoubleFunction<String> describer(); }
/** * An {@code int} specialized version of the {@link ContractConditionType} * type. */ @Value.Immutable @AffirmImmutableStyleType public interface ContractIntConditionType { /** * @return A predicate that must evaluate to {@code true} for the contract to * hold */ @Value.Parameter(order = 0) IntPredicate predicate(); /** * @return A function that returns a textual description of the predicate */ @Value.Parameter(order = 1) IntFunction<String> describer(); }
/** * An individual predicate in a contract. * * @param <T> The type of input values */ @Value.Immutable @AffirmImmutableStyleType public interface ContractConditionType<T> { /** * @return A predicate that must evaluate to {@code true} for the contract to * hold */ @Value.Parameter(order = 0) Predicate<T> predicate(); /** * @return A function that returns a textual description of the predicate */ @Value.Parameter(order = 1) Function<T, String> describer(); }