public class Pair extends Object implements Comparable<Pair>
| Modifier and Type | Field and Description |
|---|---|
BigInteger | distDistance between the routers. |
RouterInfo | r1First router. |
RouterInfo | r2Second router. |
| Constructor and Description |
|---|
Pair(RouterInfo ri1,
RouterInfo ri2,
BigInteger distance)Pair. |
| Modifier and Type | Method and Description |
|---|---|
int | compareTo(Pair p)Compare this pair's distance to another pair's. |
boolean | equals(Object o)Whether this pair equals the given object. |
int | hashCode()Hash code for this pair. |
public final BigInteger dist
public final RouterInfo r1
public final RouterInfo r2
public Pair(RouterInfo ri1, RouterInfo ri2, BigInteger distance)
public int compareTo(Pair p)
compareTo in interface Comparable<Pair>public boolean equals(Object o)