public class SimpleRankedDocRef extends AbstractChangeable implements RankedDocRef
LOCATION, RANK| Modifier | Constructor and Description | 
|---|---|
| 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. | 
| Modifier and Type | Method and Description | 
|---|---|
| int | compareTo(Object o)
 Ranked document references are sorted first by rank then location
 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 location and 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() | 
| void | setLocation(RichLocation location)Set the location of this reference. | 
| void | setRank(int rank)Set the rank of this reference. | 
| String | toString()
 Form: "(#rank) docref" | 
addChangeListener, addChangeListener, generateChangeSupport, getChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListenerclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListenerpublic 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()
public void setRank(int rank) throws ChangeVetoException
setRank in interface RankedDocRefrank - the rank to use.ChangeVetoException - if the new rank is unacceptable.public int getRank()
getRank in interface RankedDocRefpublic DocRef getDocumentReference()
getDocumentReference in interface RankedDocRefpublic Integer getStart()
getStart in interface RankedDocRefpublic Integer getEnd()
getEnd in interface RankedDocRefpublic void setLocation(RichLocation location) throws ChangeVetoException
setLocation in interface RankedDocReflocation - the location to use.ChangeVetoException - if the new location is unacceptable.public RichLocation getLocation()
RankedDocRefgetLocation in interface RankedDocRefpublic boolean equals(Object obj)
public int compareTo(Object o)
compareTo in interface ComparableCopyright © 2014 BioJava. All rights reserved.