Package org.biojava.bio.program.tagvalue
Class RegexChanger
java.lang.Object
org.biojava.bio.program.tagvalue.RegexChanger
- All Implemented Interfaces:
ChangeTable.Changer
A ValueChanger.Changer that returns a specific match value using a regex Pattern.
- Since:
- 1.3
- Author:
- Matthew Pocock
-
Constructor Summary
ConstructorsConstructorDescriptionRegexChanger
(Pattern pattern, int matchGroup) Create a new RegexChanger with a pattern. -
Method Summary
-
Constructor Details
-
RegexChanger
Create a new RegexChanger with a pattern.- Parameters:
pattern
- the Pattern used to split valuesmatchGroup
- the group to pull out - use 0 to pull out the whole match
-
-
Method Details
-
change
Description copied from interface:ChangeTable.Changer
Produce 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.
- Specified by:
change
in interfaceChangeTable.Changer
- Parameters:
value
- the old value Object- Returns:
- the new value Object
- Throws:
ParserException
- if value could not be changed
-