public class AnnotationChanger extends AbstractAnnotation
AnnotationChanger
remaps the values of an
Annotation
to new values specified by a
ValueChanger
. This will modify the values
associated with properties, but not the property names.
For writing light-weigth adaptors to project one type of
Annotation to another using a ChangeTable.EMPTY_ANNOTATION, PROPERTY
Constructor and Description |
---|
AnnotationChanger(Annotation wrapped,
ChangeTable changer)
Creates a new
AnnotationChanger using the
specified ValueChanger to remap its values. |
Modifier and Type | Method and Description |
---|---|
ChangeTable |
getChanger()
getMapper returns the ValueChanger being
used to remap the Annotation . |
Map |
getProperties()
getProperties returns the mapped contents of the
underlying Annotation as a Map . |
Annotation |
getWrapped()
getWrapped returns the Annotation
being remapped. |
boolean |
propertiesAllocated()
propertiesAllocated is a convenience method to see
if we have allocated the properties Map . |
asMap, containsProperty, equals, getProperty, hashCode, keys, removeProperty, setProperty, toString
addChangeListener, addChangeListener, generateChangeSupport, getChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListener
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener
public AnnotationChanger(Annotation wrapped, ChangeTable changer)
AnnotationChanger
using the
specified ValueChanger
to remap its values.wrapped
- an Annotation
.changer
- a ValueChanger
.public Annotation getWrapped()
getWrapped
returns the Annotation
being remapped.Annotation
.public ChangeTable getChanger()
getMapper
returns the ValueChanger
being
used to remap the Annotation
.ValueChanger
.public Map getProperties()
getProperties
returns the mapped contents of the
underlying Annotation
as a Map
.getProperties
in class AbstractAnnotation
Map
.public boolean propertiesAllocated()
propertiesAllocated
is a convenience method to see
if we have allocated the properties Map
.propertiesAllocated
in class AbstractAnnotation
boolean
true if the properties have been
allocated, false otherwise.Copyright © 2014 BioJava. All rights reserved.