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, toString
addChangeListener, addChangeListener, generateChangeSupport, getChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListener
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener
public 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 AbstractAnnotation
LinkedHashMap
of properties and valuesprotected final boolean propertiesAllocated()
propertiesAllocated
in class AbstractAnnotation
Copyright © 2014 BioJava. All rights reserved.