|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectweka.core.parser.java_cup.terminal_set
public class terminal_set
A set of terminals implemented as a bitset.
| Field Summary | |
|---|---|
static terminal_set |
EMPTY
Constant for the empty 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_set other)
Add (union) in a complete set. |
boolean |
add(terminal sym)
Add a single terminal to the set. |
boolean |
contains(int indx)
Given its index determine if the set contains a particular terminal. |
boolean |
contains(terminal sym)
Determine if the set contains a particular terminal. |
boolean |
empty()
Determine if the set is empty. |
boolean |
equals(java.lang.Object other)
Generic equality comparison. |
boolean |
equals(terminal_set other)
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. |
void |
remove(terminal sym)
Remove a terminal if it is in the set. |
java.lang.String |
toString()
Convert to string. |
| Methods inherited from class java.lang.Object |
|---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final terminal_set EMPTY
| Constructor Detail |
|---|
public terminal_set()
public terminal_set(terminal_set other)
throws internal_error
other - the set we are cloning from.
internal_error| Method Detail |
|---|
public boolean empty()
public boolean contains(terminal sym)
throws internal_error
sym - the terminal symbol we are looking for.
internal_errorpublic boolean contains(int indx)
indx - the index of the terminal in question.
public boolean is_subset_of(terminal_set other)
throws internal_error
other - the set we are testing against.
internal_error
public boolean is_superset_of(terminal_set other)
throws internal_error
other - the set we are testing against.
internal_error
public boolean add(terminal sym)
throws internal_error
sym - the terminal being added.
internal_error
public void remove(terminal sym)
throws internal_error
sym - the terminal being removed.
internal_error
public boolean add(terminal_set other)
throws internal_error
other - the set being added.
internal_error
public boolean intersects(terminal_set other)
throws internal_error
other - the other set in question.
internal_errorpublic boolean equals(terminal_set other)
public boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||