java.lang.Object
net.i2p.router.sybil.Pair
- All Implemented Interfaces:
Comparable<Pair>
A pair of routers and the distance between them.
Field Summary
FieldsModifier and TypeFieldDescriptionfinal BigIntegerDistance between the routers.final RouterInfoFirst router.final RouterInfoSecond router.Constructor Summary
ConstructorsConstructorDescriptionPair(RouterInfo ri1, RouterInfo ri2, BigInteger distance) Holds the two routers and their Kademlia distance.Method Summary
All Methods
Field Details
r1
First router.r2
Second router.dist
Distance between the routers.
Constructor Details
Pair
Holds the two routers and their Kademlia distance.- Parameters:
ri1- the first router of the pairri2- the second router of the pairdistance- the Kademlia distance between the two routers
Method Details
compareTo
Compare this pair's distance to another pair's.- Specified by:
compareToin interfaceComparable<Pair>
equals
hashCode