|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.biojavax.SimpleComment
public class SimpleComment
An implementaion of Comment.
| 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. |
int |
getRank()
Returns the rank of this comment. |
int |
hashCode()
|
protected void |
setComment(String comment)
|
String |
toString()
Form: "(#rank) comment" |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| 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 Commentpublic int getRank()
getRank in interface Commentpublic boolean equals(Object obj)
equals in class Objectpublic int compareTo(Object o)
compareTo in interface Comparablepublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||