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 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: Specification
        Evaluates if the candidate object passed as argument satisfies the specification.
        Specified by:
        isSatisfiedBy in interface Specification<T>
        Parameters:
        candidate - the candidate object to check.
        Returns:
        true if the candidate object satisfies the specification, false otherwise.