SimpleComment (BioJava-1.5-beta API)
Keywords: org.biojavax.SimpleComment class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.biojavax
Class SimpleComment

    java.lang.Object
      org.biojavax.SimpleComment

All Implemented Interfaces:
  Comparable, Comment

    public class SimpleComment

extends Object
implements Comment

An implementaion of Comment.

Since:
  1.5
Author:
  Richard Holland

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

### SimpleComment

    public SimpleComment(String comment,
                         int rank)

  Constructs a new, immutable comment, given some text and a rank.

  Parameters:
    `comment` - the text of the comment. Cannot be null.
    `rank` - the rank of the comment.

### SimpleComment

    protected SimpleComment()

Method Detail

### setComment

    protected void setComment(String comment)

### getComment

    public String getComment()

  Returns the comment part of this comment.

  Specified by:
    `getComment` in interface `Comment`
  Returns:
    a comment.

### getRank

    public int getRank()

  Returns the rank of this comment.

  Specified by:
    `getRank` in interface `Comment`
  Returns:
    the rank.

### equals

    public boolean equals(Object obj)

  Two comments are defined as equal if their text values and rankings are identical.

  Overrides:
    `equals` in class `Object`

### compareTo

    public int compareTo(Object o)

  Comments are ordered first by their rank, then by a string comparison of their text values.

  Specified by:
    `compareTo` in interface `Comparable`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `Object`

### toString

    public String toString()

  Form: "(#rank) comment"

  Overrides:
    `toString` in class `Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD