public AndSpec(Spec x, Spec y) { this.x = x; this.y = y; }
public IList SelectBy(Spec spec) { IList foundProducts = new ArrayList(); IEnumerator products = repository.GetEnumerator(); while (products.MoveNext()) { Product product = (Product)products.Current; if (spec.isSatisfiedBy(product)) foundProducts.Add(product); } return foundProducts; }
public NotSpec(Spec x) { this.x = x; }