public class SimpleRankedCrossRef extends AbstractChangeable implements RankedCrossRef
RANK| Modifier | Constructor and Description |
|---|---|
protected |
SimpleRankedCrossRef() |
|
SimpleRankedCrossRef(CrossRef crossref,
int rank)
Constructs a new crossref with a rank.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Object o)
Ranked cross references are sorted first by rank, then by cross reference.
|
boolean |
equals(Object obj)
Ranked cross references are the same if they have the same rank and
refer to the same cross reference (cross references are equal).
|
CrossRef |
getCrossRef()
Return the cross reference associated with this object.
|
int |
getRank()
Return the rank associated with the cross reference.
|
int |
hashCode() |
void |
setRank(int rank)
Set the rank associated with the cross reference.
|
String |
toString()
Form: "(#rank) crossref"
|
addChangeListener, addChangeListener, generateChangeSupport, getChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListenerclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListenerpublic SimpleRankedCrossRef(CrossRef crossref, int rank)
crossref - the crossref to rank. Must not be null.rank - the rank to give it.protected SimpleRankedCrossRef()
public CrossRef getCrossRef()
getCrossRef in interface RankedCrossRefpublic void setRank(int rank) throws ChangeVetoException
setRank in interface RankedCrossRefrank - the rank to use.ChangeVetoException - if the new rank is unacceptable.public int getRank()
getRank in interface RankedCrossRefpublic boolean equals(Object obj)
public int compareTo(Object o)
compareTo in interface ComparableCopyright © 2020 BioJava. All rights reserved.