public boolean subsumes(Specification other) {
  if (other instanceof CompositeSpecification) {
    Collection otherLeaves =
       (CompositeSpecification) other.leafSpecifications();
    Iterator it = otherLeaves.iterator();
    while (it.hasNext()) {
        if (!leafSpecifications().contains(it.next()))
          return false;
    }
  } else {
      if (!leafSpecifications().contains(other))
        return false;
  }
  return true;
}
