//  Data Structures with Java by John R. Hubbard
//  Copyright McGraw-Hill, 2001
//  Problem 5.5 on page 106

  public boolean containsAll(Collection collection)
  { // returns true iff every object in the given collection
    // is equal to some object in this bag; that is,
    // iff the the given collection is a subset of this bag;
    for (Iterator it = collection.iterator(); it.hasNext(); )
      if (!this.contains(it.next())) return false;
    return true;
  }
