org.biojava.bio.program.tagvalue
public class RegexChanger extends Object implements ChangeTable.Changer
A ValueChanger.Changer that returns a specific match value using a regex Pattern.
| Constructor and Description |
|---|
RegexChanger(Pattern pattern,
int matchGroup)
Create a new RegexChanger with a pattern.
|
public RegexChanger(Pattern pattern, int matchGroup)
pattern - the Pattern used to split valuesmatchGroup - the group to pull out - use 0 to pull out the whole matchpublic Object change(Object value) throws ParserException
ChangeTable.ChangerProduce a modified value from an old value.
It is strongly recommended that this method is re-entrant and does not modify the state of the Changer in a way that would affect future return -values.
change in interface ChangeTable.Changervalue - the old value ObjectParserException - if value could not be changed