Package org.biojava.bio.program.tagvalue
Class ChangeTable
- java.lang.Object
-
- org.biojava.bio.program.tagvalue.ChangeTable
-
public class ChangeTable extends java.lang.ObjectA mapping between keys and actions to turn old values into new values.
- Since:
- 1.3
- Author:
- Matthew Pocock
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classChangeTable.ChainedChangerAn implementation of Changer that applies a list of Changer instances to the value in turn.static interfaceChangeTable.ChangerCallback used to produce a new value from an old one.static interfaceChangeTable.SplitterCallback used to produce a list of values from a single old one.
-
Field Summary
Fields Modifier and Type Field Description static ChangeTable.ChangerSTRING_TO_INT
-
Constructor Summary
Constructors Constructor Description ChangeTable()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectchange(java.lang.Object tag, java.lang.Object value)ChangeTable.ChangergetChanger(java.lang.Object tag)Get the Changer currently registered to handle a tag.ChangeTable.SplittergetSplitter(java.lang.Object tag)Get the Splitter currently registered to handle a tag.voidsetChanger(java.lang.Object tag, ChangeTable.Changer changer)Set the Changer to be used for all values of a particular tag.voidsetSplitter(java.lang.Object tag, ChangeTable.Splitter splitter)Set the Splitter to be used for all values of a particular tag.
-
-
-
Field Detail
-
STRING_TO_INT
public static final ChangeTable.Changer STRING_TO_INT
-
-
Method Detail
-
setChanger
public void setChanger(java.lang.Object tag, ChangeTable.Changer changer)Set the Changer to be used for all values of a particular tag.- Parameters:
tag- the tag Object which will have all values changedchanger- the Changer used to change the values
-
setSplitter
public void setSplitter(java.lang.Object tag, ChangeTable.Splitter splitter)Set the Splitter to be used for all values of a particular tag.- Parameters:
tag- the tag Object which will have all values splitsplitter- the Splitter used to split the values
-
getChanger
public ChangeTable.Changer getChanger(java.lang.Object tag)
Get the Changer currently registered to handle a tag.- Parameters:
tag- the tag Object for which values would be changed- Returns:
- the associated Changer or null
-
getSplitter
public ChangeTable.Splitter getSplitter(java.lang.Object tag)
Get the Splitter currently registered to handle a tag.- Parameters:
tag- the tag Object for which values would be split- Returns:
- the associated Splitter or null
-
change
public java.lang.Object change(java.lang.Object tag, java.lang.Object value) throws ParserException- Throws:
ParserException
-
-