|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.biojava.utils.AbstractChangeable
org.biojava.bio.AbstractAnnotation
org.biojava.bio.SimpleAnnotation
public class SimpleAnnotation
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 FormField Summary |
---|
Fields inherited from interface org.biojava.bio.Annotation |
---|
EMPTY_ANNOTATION, PROPERTY |
Constructor Summary | |
---|---|
SimpleAnnotation()
Create a new, empty SimpleAnnotation instance. |
|
SimpleAnnotation(Annotation ann)
Create a new SimpleAnnotation by copying the properties from another one. |
|
SimpleAnnotation(java.util.Map map)
Create a new SimpleAnnotation using the values in a Map. |
Method Summary | |
---|---|
protected java.util.Map |
getProperties()
Get the property value pairs in this annotation |
protected boolean |
propertiesAllocated()
Test to see if any properties have been allocated |
Methods inherited from class org.biojava.bio.AbstractAnnotation |
---|
asMap, containsProperty, equals, getProperty, hashCode, keys, removeProperty, setProperty, toString |
Methods inherited from class org.biojava.utils.AbstractChangeable |
---|
addChangeListener, addChangeListener, generateChangeSupport, getChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListener |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.biojava.utils.Changeable |
---|
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener |
Constructor Detail |
---|
public SimpleAnnotation()
public SimpleAnnotation(Annotation ann)
ann
- the Annotation to copypublic SimpleAnnotation(java.util.Map map)
map
- the Map to copy properties out ofMethod Detail |
---|
protected final java.util.Map getProperties()
getProperties
in class AbstractAnnotation
LinkedHashMap
of properties and valuesprotected final boolean propertiesAllocated()
propertiesAllocated
in class AbstractAnnotation
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |