|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectMapper.Symbol
public class Symbol
This class implements a symbol of a grammar, be it a non-terminal or terminal symbol. It is used both by the Rule class, to specify its left side non-terminal symbols, and by the Production class, to specify its terminal and non-terminal symbols. It is also used by the Phenotype class, to specify phenotypic symbols.
| Constructor Summary | |
|---|---|
Symbol()
Default constructor, creates a symbol with an empty string. |
|
Symbol(java.lang.String newString,
Enums.SymbolType newType)
Creates a symbol of type symbolType and with the string |
|
Symbol(Symbol copy)
Copy constructor |
|
| Method Summary | |
|---|---|
void |
clear()
Clears the string and type |
boolean |
equals(java.lang.String newSymbol)
Compares the symbol strings of this and the symbol passed as a parameter |
boolean |
equals(Symbol newSymbol)
Compare type and symbol string value |
java.lang.String |
getSymbolString()
Get the symbol string |
Enums.SymbolType |
getType()
Return the type of the symbol |
void |
setSymbolString(java.lang.String s)
Set the string of the symbol |
void |
setType(Enums.SymbolType newType)
Set the type of the symbol |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Symbol()
public Symbol(java.lang.String newString,
Enums.SymbolType newType)
newString - string of symbolnewType - type of symbolpublic Symbol(Symbol copy)
copy - symbol to copy| Method Detail |
|---|
public void setType(Enums.SymbolType newType)
newType - symbol typepublic Enums.SymbolType getType()
public java.lang.String getSymbolString()
public void setSymbolString(java.lang.String s)
s - symbol stringpublic boolean equals(Symbol newSymbol)
newSymbol - symbol to compare
public boolean equals(java.lang.String newSymbol)
newSymbol - symbol string
public void clear()
public 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 | |||||||||