public class terminal_set extends Object
| Modifier and Type | Field and Description | 
|---|---|
| protected BitSet | _elementsBitset to implement the actual set. | 
| static terminal_set | EMPTYConstant for the empty set. | 
| Constructor and Description | 
|---|
| terminal_set()Constructor for an empty set. | 
| terminal_set(terminal_set other)Constructor for cloning from another set. | 
| Modifier and Type | Method and Description | 
|---|---|
| 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(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. | 
| 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. | 
public static final terminal_set EMPTY
protected BitSet _elements
public terminal_set()
public terminal_set(terminal_set other) throws internal_error
other - the set we are cloning from.internal_errorprotected void not_null(Object obj) throws internal_error
obj - the object we are testing.internal_errorpublic 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_errorpublic boolean is_superset_of(terminal_set other) throws internal_error
other - the set we are testing against.internal_errorpublic boolean add(terminal sym) throws internal_error
sym - the terminal being added.internal_errorpublic void remove(terminal sym) throws internal_error
sym - the terminal being removed.internal_errorpublic boolean add(terminal_set other) throws internal_error
other - the set being added.internal_errorpublic boolean intersects(terminal_set other) throws internal_error
other - the other set in question.internal_errorpublic boolean equals(terminal_set other)
public boolean equals(Object other)
Copyright © 2003–2016 Community Z Tools Project. All rights reserved.