public class SimpleAnnotation extends AbstractAnnotation
A no-frills implementation of Annotation that is just a wrapper
around a LinkedHashMap.
It will allow you to set any property, but will throw exceptions
if you try to retrieve a property that is not set. Because of the use of
a LinkedHashMap properties are iterated in the order they
are entered.
SimpleRichAnnotation,
Serialized FormEMPTY_ANNOTATION, PROPERTY| Constructor and Description |
|---|
SimpleAnnotation()
Create a new, empty SimpleAnnotation instance.
|
SimpleAnnotation(Annotation ann)
Create a new SimpleAnnotation by copying the properties from another
one.
|
SimpleAnnotation(Map map)
Create a new SimpleAnnotation using the values in a Map.
|
| Modifier and Type | Method and Description |
|---|---|
protected Map |
getProperties()
Get the property value pairs in this annotation
|
protected boolean |
propertiesAllocated()
Test to see if any properties have been allocated
|
asMap, containsProperty, equals, getProperty, hashCode, keys, removeProperty, setProperty, toStringaddChangeListener, addChangeListener, generateChangeSupport, getChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListenerclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListenerpublic SimpleAnnotation()
public SimpleAnnotation(Annotation ann)
ann - the Annotation to copypublic SimpleAnnotation(Map map)
map - the Map to copy properties out ofprotected final Map getProperties()
getProperties in class AbstractAnnotationLinkedHashMap of properties and valuesprotected final boolean propertiesAllocated()
propertiesAllocated in class AbstractAnnotationCopyright © 2020 BioJava. All rights reserved.