public class Rule extends Object implements GrammarItem
| Modifier and Type | Class and Description |
|---|---|
static class |
Rule.RuleType |
GrammarItem.ItemTypeINDENT| Constructor and Description |
|---|
Rule(GrammarItem ruleName,
GrammarItem rhs,
boolean keyWordRule,
Rule.RuleType ruleType,
String description) |
Rule(GrammarItem ruleName,
GrammarItem rhs,
String description) |
| Modifier and Type | Method and Description |
|---|---|
List<GrammarItem> |
getChildren()
get the child items as a list.
|
String |
getDescription() |
GrammarItem |
getRhs() |
String |
getRuleName() |
Rule.RuleType |
getRuleType() |
String |
getStructure(String indent)
Reserialise showing the internal structure of the grammar.
|
GrammarItem.ItemType |
getType()
what type, in terms of how to process its conversion to main grammar
|
boolean |
isKeywordPart()
Could this be part or all of a keyword ? Is either a letter or all of its parts are letters
|
boolean |
isPlural()
are there more than one of these items.
|
GrammarItem |
reachThrough()
if this item is a wrapper round a single item, get that one.
|
void |
setRuleType(Rule.RuleType ruleType) |
public Rule(GrammarItem ruleName, GrammarItem rhs, String description)
public Rule(GrammarItem ruleName, GrammarItem rhs, boolean keyWordRule, Rule.RuleType ruleType, String description)
public Rule.RuleType getRuleType()
public void setRuleType(Rule.RuleType ruleType)
public GrammarItem.ItemType getType()
GrammarItemgetType in interface GrammarItempublic String getRuleName()
public String getDescription()
public GrammarItem getRhs()
public List<GrammarItem> getChildren()
GrammarItemgetChildren in interface GrammarItempublic boolean isPlural()
GrammarItemisPlural in interface GrammarItempublic String getStructure(String indent)
GrammarItemgetStructure in interface GrammarItemindent - how much to indent each level of the structurepublic GrammarItem reachThrough()
GrammarItemreachThrough in interface GrammarItempublic boolean isKeywordPart()
GrammarItemisKeywordPart in interface GrammarItemCopyright © 2019. All rights reserved.