/** Compute a hash code. */ public int hashCode() { int result = 0; int cnt; Enumeration e; /* hash together codes from at most first 5 elements */ for (e = all(), cnt=0 ; e.hasMoreElements() && cnt<5; cnt++) result ^= ((symbol)e.nextElement()).hashCode(); return result; }
/** Compute a hash code. */ public int hashCode() { int result = 0; int cnt; Enumeration e; /* hash together codes from at most first 5 elements */ for (e = all(), cnt=0 ; e.hasMoreElements() && cnt<5; cnt++) result ^= ((symbol)e.nextElement()).hashCode(); return result; }
/** Compute a hash code. */ public int hashCode() { int result = 0; int cnt; Enumeration e; /* hash together codes from at most first 5 elements */ for (e = all(), cnt=0 ; e.hasMoreElements() && cnt<5; cnt++) result ^= ((symbol)e.nextElement()).hashCode(); return result; }
/** Compute a hash code. */ public int hashCode() { int result = 0; int cnt; Enumeration e; /* hash together codes from at most first 5 elements */ for (e = all(), cnt=0 ; e.hasMoreElements() && cnt<5; cnt++) result ^= ((symbol)e.nextElement()).hashCode(); return result; }
/** Compute a hash code. */ public int hashCode() { int result = 0; int cnt; Enumeration e; /* hash together codes from at most first 5 elements */ for (e = all(), cnt=0 ; e.hasMoreElements() && cnt<5; cnt++) result ^= ((symbol)e.nextElement()).hashCode(); return result; }
/** Compute a hash code. */ public int hashCode() { int result = 0; int cnt; Enumeration e; /* hash together codes from at most first 5 elements */ for (e = all(), cnt=0 ; e.hasMoreElements() && cnt<5; cnt++) result ^= ((symbol)e.nextElement()).hashCode(); return result; }
/** Compute a hash code. */ public int hashCode() { int result = 0; int cnt; Enumeration e; /* hash together codes from at most first 5 elements */ for (e = all(), cnt=0 ; e.hasMoreElements() && cnt<5; cnt++) result ^= ((symbol)e.nextElement()).hashCode(); 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; }
/** 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; }
/** 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()); }
/** 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()); };
/** 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()); }
/** 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()); }
/** 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; }
/** 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; }