public class OrderedRules extends Object implements RuleGroup
Each rule consists of a regular expression pattern and a replacement string. The rules will be applied in an arbitrary order.
These rules should only be applied on enzyme reaction data.
Modifier and Type | Method and Description |
---|---|
String |
applyRules(String text)
Applies the rules.
|
static OrderedRules |
getInstance()
Returns the sole instance of this class.
|
String |
reverseRules(String text)
Applies the reverse rules.
|
public static OrderedRules getInstance()
If no instance is available yet then it will be created.
public String applyRules(String text)
applyRules
in interface RuleGroup
text
- The text to be translated.NullPointerException
- if text
is null
.public String reverseRules(String text)
reverseRules
in interface RuleGroup
text
- The text to be translated.NullPointerException
- if text
is null
.Copyright © 2013 EMBL-EBI. All rights reserved.