|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.biojava.utils.AbstractChangeable
org.biojavax.SimpleComment
public class SimpleComment
An implementaion of Comment.
Field Summary |
---|
Fields inherited from interface org.biojavax.Comment |
---|
RANK |
Constructor Summary | |
---|---|
protected |
SimpleComment()
|
|
SimpleComment(String comment,
int rank)
Constructs a new, immutable comment, given some text and a rank. |
Method Summary | |
---|---|
int |
compareTo(Object o)
Comments are ordered first by their rank, then by a string comparison of their text values. |
boolean |
equals(Object obj)
Two comments are defined as equal if their text values and rankings are identical. |
String |
getComment()
Returns the comment part of this comment. |
Integer |
getId()
Gets the Hibernate ID. |
int |
getRank()
Returns the rank of this comment. |
int |
hashCode()
|
protected void |
setComment(String comment)
|
void |
setId(Integer id)
Sets the Hibernate ID. |
void |
setRank(int rank)
Sets the rank of this comment. |
String |
toString()
Form: "(#rank) comment" |
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 SimpleComment(String comment, int rank)
comment
- the text of the comment. Cannot be null.rank
- the rank of the comment.protected SimpleComment()
Method Detail |
---|
protected void setComment(String comment)
public String getComment()
getComment
in interface Comment
public void setRank(int rank) throws ChangeVetoException
setRank
in interface Comment
rank
- the rank to use.
ChangeVetoException
- if the new rank is unacceptable.public int getRank()
getRank
in interface Comment
public boolean equals(Object obj)
equals
in class Object
public int compareTo(Object o)
compareTo
in interface Comparable
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
public Integer getId()
public void setId(Integer id)
id
- the Hibernate ID, if using Hibernate.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |