public interface ParsingRule extends Serializable
Modifier and Type | Interface and Description |
---|---|
static class |
ParsingRule.RuleType
Rule types.
|
Modifier and Type | Method and Description |
---|---|
String |
getId()
Returns the ID of this ParsingRule object.
|
ParsingRule.RuleType |
getRuleType()
Returns the type of this rule.
|
ParsingRule |
ofType(ParsingRule.RuleType ruleType)
Sets the type of this ParsingRule.
|
void |
setRegularExpression(String regExpStr)
Sets a regular expression to this ParsingRule.
|
void |
setRuleType(ParsingRule.RuleType ruleType)
Sets the type of this ParsingRule.
|
ParsingRule |
withRegularExpression(String regExpStr)
Sets the rule to be the specified regular expression.
|
String getId()
void setRuleType(ParsingRule.RuleType ruleType)
ruleType
- the type of this rule.ParsingRule ofType(ParsingRule.RuleType ruleType)
ruleType
- the type of this ruleParsingRule.RuleType getRuleType()
void setRegularExpression(String regExpStr)
setRuleType(ParsingRule.RuleType.PORT); setRegularExpression("80??"); setRuleType(ParsingRule.RuleType.COMMAND_LINE); setRegularExpression(".+\\s+(\\s+)$");A literal string can be passed instead of a regular expression is required. A call to this method overrides a previous call to it or to withRegularExpression(String regExpStr).
regExpStr
- the regular expression which should be set.ParsingRule withRegularExpression(String regExpStr)
setRuleType(ParsingRule.RuleType.PORT); ParsingRule myPRule = withRegularExpression("80??"); setRuleType(ParsingRule.RuleType.COMMAND_LINE); setRegularExpression(".+\\s+(\\s+)$");A literal string can be passed instead of a regular expression is required. A call to this method overrides a previous call to it or to setRegularExpression(String regExpStr).
regExpStr
- the regular expression which should be set. Documentation Feedback
Copyright 2011 - 2018 Micro Focus or one of its affiliates.