java_cup
public class terminal_set extends Object
Version: last updated: 11/25/95
Field Summary | |
---|---|
static terminal_set | EMPTY Constant for the empty set. |
protected BitSet | _elements Bitset to implement the actual set. |
Constructor Summary | |
---|---|
terminal_set() Constructor for an empty set. | |
terminal_set(terminal_set other) Constructor for cloning from another set. |
Method Summary | |
---|---|
boolean | add(terminal sym) Add a single terminal to the set. |
boolean | add(terminal_set other) Add (union) in a complete set. |
boolean | contains(terminal sym) Determine if the set contains a particular terminal. |
boolean | contains(int indx) Given its index determine if the set contains a particular terminal. |
boolean | empty() Determine if the set is empty. |
boolean | equals(terminal_set other) Equality comparison. |
boolean | equals(Object other) Generic equality comparison. |
boolean | intersects(terminal_set other) Determine if this set intersects another. |
boolean | is_subset_of(terminal_set other) Determine if this set is an (improper) subset of another. |
boolean | is_superset_of(terminal_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(terminal sym) Remove a terminal if it is in the set. |
String | toString() Convert to string. |
Parameters: other the set we are cloning from.
Parameters: sym the terminal being added.
Returns: true if this changes the set.
Parameters: other the set being added.
Returns: true if this changes the set.
Parameters: sym the terminal symbol we are looking for.
Parameters: indx the index of the terminal in question.
Parameters: other the other set in question.
Parameters: other the set we are testing against.
Parameters: other the set we are testing against.
Parameters: obj the object we are testing.
Parameters: sym the terminal being removed.