Specification Pattern
Encapsulate business rules as reusable objects
Overview
The Specification pattern encapsulates a business rule into a single, reusable object. These specifications can often be chained together using logical AND, OR, and NOT operations.
Code Example
java
1public interface Specification<T> { boolean isSatisfiedBy(T item); }