Interface SubstitutableSpecification<T>
-
- Type Parameters:
T- the type of the candidate object the specification applies to.
- All Superinterfaces:
Specification<T>
public interface SubstitutableSpecification<T> extends Specification<T>
Specifications that can be substituted by another specification without changing the satisfaction result should implement this interface.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Specification<T>getSubstitute()Returns the specification it can be be substituted with.default booleanisSatisfiedBy(T candidate)Evaluates if the candidate object passed as argument satisfies the specification.-
Methods inherited from interface org.seedstack.business.specification.Specification
and, asPredicate, negate, or
-
-
-
-
Method Detail
-
getSubstitute
Specification<T> getSubstitute()
Returns the specification it can be be substituted with.- Returns:
- the specification this specification can be substituted with.
-
isSatisfiedBy
default boolean isSatisfiedBy(T candidate)
Description copied from interface:SpecificationEvaluates if the candidate object passed as argument satisfies the specification.- Specified by:
isSatisfiedByin interfaceSpecification<T>- Parameters:
candidate- the candidate object to check.- Returns:
- true if the candidate object satisfies the specification, false otherwise.
-
-