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(java.lang.Object o)
Ranked cross references are sorted first by rank, then by cross reference.
|
boolean |
equals(java.lang.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.
|
java.lang.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(java.lang.Object obj)
equals
in class java.lang.Object
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object