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, removeChangeListener
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener
public 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 RankedCrossRef
public void setRank(int rank) throws ChangeVetoException
setRank
in interface RankedCrossRef
rank
- the rank to use.ChangeVetoException
- if the new rank is unacceptable.public int getRank()
getRank
in interface RankedCrossRef
public boolean equals(Object obj)
public int compareTo(Object o)
compareTo
in interface Comparable
Copyright © 2014 BioJava. All rights reserved.