|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectMapper.Grammar
public abstract class Grammar
Abstract class for mapping using a Grammar
Method Summary | |
---|---|
abstract void |
clear()
Clears the mapper by dereferencing the genotype and phenotype. |
abstract boolean |
genotype2Phenotype()
Maps from a input(genotype) to an output (phenotype) |
abstract java.lang.String |
getDerivationString()
|
int |
getProductionCount()
Get the number of productions in the grammar |
java.util.ArrayList<Rule> |
getRules()
Get the rules in the grammar |
Rule |
getStartRule()
Return pointer to current start rule. |
Symbol |
getStartSymbol()
Get the start symbol of the grammar If there are no rules null is returned |
java.util.ArrayList<Symbol> |
getTerminals()
Get a list of all the symbols which are terminals, ie the alphabet over which this grammar's language is defined. |
java.util.ArrayList<java.lang.String> |
getTerminalStrings()
Get a list of all the terminal strings for this grammar. |
abstract boolean |
phenotype2Genotype()
Not yet implemented! |
void |
setRules(java.util.ArrayList<Rule> newRules)
Set rules in grammar |
boolean |
setStartSymbol(java.lang.String newStartSymbol)
Change start symbol by string. |
boolean |
setStartSymbol(Symbol newStartSymbol)
Change start symbol by symbol. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface Mapper.Mapper |
---|
getGenotype, getPhenotype, setGenotype, setPhenotype |
Method Detail |
---|
public abstract boolean genotype2Phenotype()
Mapper
genotype2Phenotype
in interface Mapper
public abstract boolean phenotype2Genotype()
Mapper
phenotype2Genotype
in interface Mapper
public abstract java.lang.String getDerivationString()
public abstract void clear()
Mapper
clear
in interface Mapper
public Symbol getStartSymbol()
public boolean setStartSymbol(Symbol newStartSymbol)
newStartSymbol
- new start symbol
public boolean setStartSymbol(java.lang.String newStartSymbol)
newStartSymbol
- new start symbol
public Rule getStartRule()
public java.util.ArrayList<Rule> getRules()
public int getProductionCount()
public void setRules(java.util.ArrayList<Rule> newRules)
newRules
- rules to setpublic java.util.ArrayList<Symbol> getTerminals()
public java.util.ArrayList<java.lang.String> getTerminalStrings()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |