原书出处
Domain-Driven Design Tackling Complexity in the Heart of Software
81 原书第10章|A Declarative Style of Design
th only the AND operator is simple: A AND B A or, in a more complicated case: A AND B AND C A AND B
So if the Composite Specification is able to collect all the leaf SPECIFICATIONS that are "ANDed" together, then all we have to do is check that the subsuming SPECIFICATION has all the leaves that the subsumed one has, and maybe some extra ones as wellits leaves are a superset of the other SPEC's set of leaves.
public boolean subsumes(Specification other) { if (other instanceof CompositeSpecification) { Colle
原书定位详情
来源:a19c7933-4eda-4176-aebd-30fe7e1ad292
正文位置:extracted/Domain-Driven Design Tackling Complexity in the Heart of Software/_epub-src/0321125215_ch10lev1sec8.html
EPUB SHA-256:3e81897e8809ae8135b32e0563f9858b3020c5f5128531655f6d8e3a21c679ce