|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.biojavax.SimpleRankedDocRef
public class SimpleRankedDocRef
Represents a documentary reference.
| Constructor Summary | |
|---|---|
protected |
SimpleRankedDocRef()
|
|
SimpleRankedDocRef(DocRef docref,
Integer start,
Integer end,
int rank)
Constructs a new docref for a given location. |
|
SimpleRankedDocRef(DocRef docref,
RichLocation location,
int rank)
Constructs a new docref for a given location. |
| Method Summary | |
|---|---|
int |
compareTo(Object o)
Ranked document references are sorted first by rank then by actual document reference. |
boolean |
equals(Object obj)
Two ranked document references are equal if they have the same rank and refer to the same document reference. |
DocRef |
getDocumentReference()
Represents a reference to a document. |
Integer |
getEnd()
The end position in the sequence that this reference is referred to from. |
RichLocation |
getLocation()
If this object was constructed using a location instead of two integers, then this method will return that location. |
int |
getRank()
The rank of this reference. |
Integer |
getStart()
The start position in the sequence that this reference is referred to from. |
int |
hashCode()
|
protected void |
setLocation(RichLocation location)
|
String |
toString()
Form: "(#rank) docref" |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleRankedDocRef(DocRef docref,
Integer start,
Integer end,
int rank)
docref - the document reference. Must not be null.start - the start position of the location.end - the end position of the location.
public SimpleRankedDocRef(DocRef docref,
RichLocation location,
int rank)
docref - the document reference. Must not be null.location - the position of the document reference. Must not be null.protected SimpleRankedDocRef()
| Method Detail |
|---|
public int getRank()
getRank in interface RankedDocRefpublic DocRef getDocumentReference()
getDocumentReference in interface RankedDocRefpublic Integer getStart()
getStart in interface RankedDocRefpublic Integer getEnd()
getEnd in interface RankedDocRefprotected void setLocation(RichLocation location)
public RichLocation getLocation()
RankedDocRef
getLocation in interface RankedDocRefpublic 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 | |||||||||