|
|||||||||||
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
A no-frills implementation of Annotation that is just a wrapper around a Map.
It will allow you to set any property, but will throw exceptions if you try to retrieve a property that is not set.
Field 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()
Implement this to return the Map delegate. |
protected boolean |
propertiesAllocated()
A convenience method to see if we have allocated the properties Map. |
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, 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) throws java.lang.IllegalArgumentException
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()
AbstractAnnotation
getProperties
in class AbstractAnnotation
protected final boolean propertiesAllocated()
AbstractAnnotation
propertiesAllocated
in class AbstractAnnotation
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |