|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectnet.sourceforge.chaperon.model.symbol.SymbolSet
public class SymbolSet
This class represents a set of symbols, which means that this set dosn't contains duplett of symbols.
| Constructor Summary | |
|---|---|
SymbolSet()
|
|
| Method Summary | |
|---|---|
boolean |
addSymbol(Symbol symbol)
|
boolean |
addSymbol(SymbolCollection collection)
|
void |
clear()
Removes all symbols from this set. |
java.lang.Object |
clone()
Create a clone of this set of symbols |
boolean |
contains(java.lang.String name)
If the list contains a symbol, given by the name of the symbol. |
boolean |
contains(Symbol symbol)
If the list contains a symbol |
boolean |
contains(SymbolCollection collection)
|
boolean |
equals(java.lang.Object o)
Compares to another set of symbols. |
SymbolSet |
getNonterminals()
Return all used nonterminal symbols in this set. |
Symbol |
getSymbol(int index)
Return a symbol giving by an index. |
Symbol |
getSymbol(java.lang.String name)
Returns a symbol from this set given by the name of the symbol. |
int |
getSymbolCount()
Returns the count of symbols in this set |
SymbolSet |
getTerminals()
Return all used terminal symbols in this set. |
int |
indexOf(java.lang.String name)
Return the index of a symbol, given by the name of the Symbol. |
int |
indexOf(Symbol symbol)
Return the index of a symbol. |
boolean |
isEmpty()
If this set is empty. |
void |
removeSymbol(int index)
Removes a symbol by an index from this set. |
void |
removeSymbol(Symbol symbol)
Removes a symbol from this set. |
void |
setSymbol(int index,
Symbol symbol)
Replace a symbol given by an index. |
java.lang.String |
toString()
Return a string representation of the set. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SymbolSet()
| Method Detail |
|---|
public boolean addSymbol(Symbol symbol)
addSymbol in interface SymbolCollectionpublic boolean addSymbol(SymbolCollection collection)
addSymbol in interface SymbolCollectionpublic void removeSymbol(int index)
removeSymbol in interface SymbolCollectionindex - Index of the symbol.public void removeSymbol(Symbol symbol)
removeSymbol in interface SymbolCollectionsymbol - Symbol, which should be removed.
public void setSymbol(int index,
Symbol symbol)
setSymbol in interface SymbolCollectionindex - The index, at which the symbol be inserted.symbol - Symbol.public Symbol getSymbol(int index)
getSymbol in interface SymbolCollectionindex - Index of the symbol.
public Symbol getSymbol(java.lang.String name)
getSymbol in interface SymbolCollectionname - Name of the symbol.
public int getSymbolCount()
getSymbolCount in interface SymbolCollectionpublic boolean isEmpty()
isEmpty in interface SymbolCollectionpublic int indexOf(Symbol symbol)
indexOf in interface SymbolCollectionsymbol - Symbol.
public int indexOf(java.lang.String name)
indexOf in interface SymbolCollectionname - Name of symbol.
public boolean contains(Symbol symbol)
contains in interface SymbolCollectionsymbol - Symbol
public boolean contains(java.lang.String name)
contains in interface SymbolCollectionname - Name of the symbol.
public boolean contains(SymbolCollection collection)
public void clear()
clear in interface SymbolCollectionpublic SymbolSet getTerminals()
public SymbolSet getNonterminals()
public boolean equals(java.lang.Object o)
equals in interface SymbolCollectionequals in class java.lang.Objecto - Another object.
public java.lang.String toString()
toString in interface SymbolCollectiontoString in class java.lang.Objectpublic java.lang.Object clone()
clone in class java.lang.Objectjava.lang.CloneNotSupportedException - If a exception occurs during the cloning.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||