|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.biojava.utils.AbstractChangeable
org.biojavax.SimpleNote
public class SimpleNote
Simple implementation of Note.
Field Summary |
---|
Fields inherited from interface org.biojavax.Note |
---|
RANK, TERM, VALUE |
Constructor Summary | |
---|---|
protected |
SimpleNote()
|
|
SimpleNote(ComparableTerm term,
String value,
int rank)
Creates a new instance of SimpleNote with a given term, value and rank. |
Method Summary | |
---|---|
int |
compareTo(Object o)
Notes are compared first by rank, then by the term. |
boolean |
equals(Object o)
Notes are equal if they have the same rank and term. |
int |
getRank()
Gets the rank that defines this note. |
ComparableTerm |
getTerm()
Gets the term that defines this note. |
String |
getValue()
Gets the value that defines this note. |
int |
hashCode()
|
void |
setRank(int rank)
Sets the rank for this note. |
void |
setTerm(ComparableTerm term)
Sets the term for this note. |
void |
setValue(String value)
Sets the value for this note, or null for no value. |
String |
toString()
Form: "(#rank) term: value" |
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 SimpleNote(ComparableTerm term, String value, int rank)
term
- the term of the note. Cannot be null.value
- the (optional) value to give it.rank
- the rank to give it.protected SimpleNote()
Method Detail |
---|
public ComparableTerm getTerm()
getTerm
in interface Note
public void setTerm(ComparableTerm term) throws ChangeVetoException
setTerm
in interface Note
term
- the term to use.
ChangeVetoException
- if it doesn't like the term.public String getValue()
getValue
in interface Note
public void setValue(String value) throws ChangeVetoException
setValue
in interface Note
value
- the value to use.
ChangeVetoException
- if it doesn't like the value.public int getRank()
getRank
in interface Note
public void setRank(int rank) throws ChangeVetoException
setRank
in interface Note
rank
- the rank to use.
ChangeVetoException
- if it doesn't like the rank.public int compareTo(Object o)
compareTo
in interface Comparable
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |