|
|||||||||
| Home >> All >> [ java_cup overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
java_cup
Class symbol_set

java.lang.Objectjava_cup.symbol_set
- public class symbol_set
- extends java.lang.Object
This class represents a set of symbols and provides a series of set operations to manipulate them.
- Version:
- last updated: 11/25/95
| Field Summary | |
protected java.util.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_set other)
Add (union) in a complete set. |
boolean |
add(symbol sym)
Add a single symbol to the set. |
java.util.Enumeration |
all()
Access to all elements of the set. |
boolean |
contains(symbol sym)
Determine if the set contains a particular symbol. |
boolean |
equals(java.lang.Object other)
Generic equality comparison. |
boolean |
equals(symbol_set other)
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(java.lang.Object obj)
Helper function to test for a null object and throw an exception if one is found. |
void |
remove(symbol_set other)
Remove (set subtract) a complete set. |
void |
remove(symbol sym)
Remove a single symbol if it is in the set. |
int |
size()
size of the set |
java.lang.String |
toString()
Convert to a string. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
_all
protected java.util.Hashtable _all
- A hash table to hold the set. Symbols are keyed using their name string.
| Constructor Detail |
symbol_set
public symbol_set()
- Constructor for an empty set.
symbol_set
public symbol_set(symbol_set other) throws internal_error
- Constructor for cloning from another set.
| Method Detail |
all
public java.util.Enumeration all()
- Access to all elements of the set.
size
public int size()
- size of the set
not_null
protected void not_null(java.lang.Object obj) throws internal_error
- Helper function to test for a null object and throw an exception
if one is found.
contains
public boolean contains(symbol sym)
- Determine if the set contains a particular symbol.
is_subset_of
public boolean is_subset_of(symbol_set other) throws internal_error
- Determine if this set is an (improper) subset of another.
is_superset_of
public boolean is_superset_of(symbol_set other) throws internal_error
- Determine if this set is an (improper) superset of another.
add
public boolean add(symbol sym) throws internal_error
- Add a single symbol to the set.
remove
public void remove(symbol sym) throws internal_error
- Remove a single symbol if it is in the set.
add
public boolean add(symbol_set other) throws internal_error
- Add (union) in a complete set.
remove
public void remove(symbol_set other) throws internal_error
- Remove (set subtract) a complete set.
equals
public boolean equals(symbol_set other)
- Equality comparison.
equals
public boolean equals(java.lang.Object other)
- Generic equality comparison.
hashCode
public int hashCode()
- Compute a hash code.
toString
public java.lang.String toString()
- Convert to a string.
|
|||||||||
| Home >> All >> [ java_cup overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
java_cup.symbol_set