Package org.biojava.bio.program.tagvalue
Class TagMapper
- java.lang.Object
-
- org.biojava.bio.program.tagvalue.TagMapper
-
- All Implemented Interfaces:
PropertyChanger
public class TagMapper extends java.lang.Object implements PropertyChanger
TagMapper
maps arbitrary object keys to new keys.If there is no explicit mapping from old to new keys, then the old key will be used.
- Since:
- 1.2
- Author:
- Matthew Pocock, Keith James (docs).
-
-
Constructor Summary
Constructors Constructor Description TagMapper()
Creates a new, emptyTagMapper
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
getNewTag(java.lang.Object oldTag)
getNewTag
returns the tag which substitutes the specified value.void
setNewTag(java.lang.Object oldTag, java.lang.Object newTag)
setNewTag
.
-
-
-
Method Detail
-
setNewTag
public void setNewTag(java.lang.Object oldTag, java.lang.Object newTag)
setNewTag
.- Parameters:
oldTag
- anObject
tag to be substituted.newTag
- anObject
tag to substitue for the old value.
-
getNewTag
public java.lang.Object getNewTag(java.lang.Object oldTag)
Description copied from interface:PropertyChanger
getNewTag
returns the tag which substitutes the specified value.If there is no mapping associated with this tag, it is returned unchanged.
- Specified by:
getNewTag
in interfacePropertyChanger
- Parameters:
oldTag
- anObject
to substitute.- Returns:
- an
Object
.
-
-