java_cup
public class symbol_set extends Object
Version: last updated: 11/25/95
See Also: symbol
Field Summary | |
---|---|
protected Hashtable | _all A hash table to hold the set. |
Constructor Summary | |
---|---|
symbol_set() Constructor for an empty set. | |
symbol_set(symbol_set other) Constructor for cloning from another set. |
Method Summary | |
---|---|
boolean | add(symbol sym) Add a single symbol to the set. |
boolean | add(symbol_set other) Add (union) in a complete set. |
Enumeration | all() Access to all elements of the set. |
boolean | contains(symbol sym) Determine if the set contains a particular symbol. |
boolean | equals(symbol_set other) Equality comparison. |
boolean | equals(Object other) Generic equality comparison. |
int | hashCode() Compute a hash code. |
boolean | is_subset_of(symbol_set other) Determine if this set is an (improper) subset of another. |
boolean | is_superset_of(symbol_set other) Determine if this set is an (improper) superset of another. |
protected void | not_null(Object obj) Helper function to test for a null object and throw an exception
if one is found. |
void | remove(symbol sym) Remove a single symbol if it is in the set. |
void | remove(symbol_set other) Remove (set subtract) a complete set. |
int | size() size of the set |
String | toString() Convert to a string. |
Parameters: other the set we are cloning from.
Parameters: sym the symbol we are adding.
Returns: true if this changes the set.
Parameters: other the set we are adding in.
Returns: true if this changes the set.
Parameters: sym the symbol we are looking for.
Parameters: other the set we are testing against.
Parameters: other the set we are are testing against.
Parameters: obj the object we are testing.
Parameters: sym the symbol we are removing.
Parameters: other the set we are removing.