/** Constructor for cloning from another set. * @param other the set we are cloning from. */ public symbol_set(symbol_set other) throws internal_error { not_null(other); _all = (Hashtable)other._all.clone(); }
/** Constructor for cloning from another set. * @param other the set we are cloning from. */ public symbol_set(symbol_set other) throws internal_error { not_null(other); _all = (Hashtable)other._all.clone(); };
/** Constructor for cloning from another set. * @param other the set we are cloning from. */ public symbol_set(symbol_set other) throws internal_error { not_null(other); _all = (Hashtable)other._all.clone(); }
/** Constructor for cloning from another set. * @param other the set we are cloning from. */ public symbol_set(symbol_set other) throws internal_error { not_null(other); _all = (Hashtable)other._all.clone(); }
/** Constructor for cloning from another set. * @param other the set we are cloning from. */ public symbol_set(symbol_set other) throws internal_error { not_null(other); _all = (Hashtable)other._all.clone(); }
/** Determine if this set is an (improper) superset of another. * @param other the set we are are testing against. */ public boolean is_superset_of(symbol_set other) throws internal_error { not_null(other); return other.is_subset_of(this); }
/** Determine if this set is an (improper) superset of another. * @param other the set we are are testing against. */ public boolean is_superset_of(symbol_set other) throws internal_error { not_null(other); return other.is_subset_of(this); }
/** Determine if this set is an (improper) superset of another. * @param other the set we are are testing against. */ public boolean is_superset_of(symbol_set other) throws internal_error { not_null(other); return other.is_subset_of(this); }
/** Remove a single symbol if it is in the set. * @param sym the symbol we are removing. */ public void remove(symbol sym) throws internal_error { not_null(sym); _all.remove(sym.name()); }
/** Determine if this set is an (improper) superset of another. * @param other the set we are are testing against. */ public boolean is_superset_of(symbol_set other) throws internal_error { not_null(other); return other.is_subset_of(this); }
/** Remove a single symbol if it is in the set. * @param sym the symbol we are removing. */ public void remove(symbol sym) throws internal_error { not_null(sym); _all.remove(sym.name()); }
/** Remove (set subtract) a complete set. * @param other the set we are removing. */ public void remove(symbol_set other) throws internal_error { not_null(other); /* walk down the other set and do the removes individually */ for (Enumeration e = other.all(); e.hasMoreElements(); ) remove((symbol)e.nextElement()); };
/** Remove (set subtract) a complete set. * @param other the set we are removing. */ public void remove(symbol_set other) throws internal_error { not_null(other); /* walk down the other set and do the removes individually */ for (Enumeration e = other.all(); e.hasMoreElements(); ) remove((symbol)e.nextElement()); }
/** Remove (set subtract) a complete set. * @param other the set we are removing. */ public void remove(symbol_set other) throws internal_error { not_null(other); /* walk down the other set and do the removes individually */ for (Enumeration e = other.all(); e.hasMoreElements(); ) remove((symbol)e.nextElement()); }
/** Determine if this set is an (improper) subset of another. * @param other the set we are testing against. */ public boolean is_subset_of(symbol_set other) throws internal_error { not_null(other); /* walk down our set and make sure every element is in the other */ for (Enumeration e = all(); e.hasMoreElements(); ) if (!other.contains((symbol)e.nextElement())) return false; /* they were all there */ return true; }
/** Determine if this set is an (improper) subset of another. * @param other the set we are testing against. */ public boolean is_subset_of(symbol_set other) throws internal_error { not_null(other); /* walk down our set and make sure every element is in the other */ for (Enumeration e = all(); e.hasMoreElements(); ) if (!other.contains((symbol)e.nextElement())) return false; /* they were all there */ return true; }
/** Determine if this set is an (improper) subset of another. * @param other the set we are testing against. */ public boolean is_subset_of(symbol_set other) throws internal_error { not_null(other); /* walk down our set and make sure every element is in the other */ for (Enumeration e = all(); e.hasMoreElements(); ) if (!other.contains((symbol)e.nextElement())) return false; /* they were all there */ return true; }
/** Add (union) in a complete set. * @param other the set we are adding in. * @return true if this changes the set. */ public boolean add(symbol_set other) throws internal_error { boolean result = false; not_null(other); /* walk down the other set and do the adds individually */ for (Enumeration e = other.all(); e.hasMoreElements(); ) result = add((symbol)e.nextElement()) || result; return result; }
/** Remove (set subtract) a complete set. * @param other the set we are removing. */ public void remove(symbol_set other) throws internal_error { not_null(other); /* walk down the other set and do the removes individually */ for (Enumeration e = other.all(); e.hasMoreElements(); ) remove((symbol)e.nextElement()); }
/** Determine if this set is an (improper) subset of another. * @param other the set we are testing against. */ public boolean is_subset_of(symbol_set other) throws internal_error { not_null(other); /* walk down our set and make sure every element is in the other */ for (Enumeration e = all(); e.hasMoreElements(); ) if (!other.contains((symbol)e.nextElement())) return false; /* they were all there */ return true; }