forked from I2P_Developers/i2p.i2p
2009-08-11 sponge
* Code Janitor time! Many fixes and documenting fixes that should be done in the future. for the most part, this is a general code cleanup. * On smaller/embedded systems, the "final" keyword cleanups will have more of an impact than on larger systems. * Document missing hashCode() methods. * Unhide more variables to make code easier to read.
This commit is contained in:
@ -106,6 +106,7 @@ public class Peer implements Comparable
|
||||
/**
|
||||
* Returns the String representation of the peerID.
|
||||
*/
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
if (peerID != null)
|
||||
@ -125,6 +126,7 @@ public class Peer implements Comparable
|
||||
/**
|
||||
* The hash code of a Peer is the hash code of the peerID.
|
||||
*/
|
||||
@Override
|
||||
public int hashCode()
|
||||
{
|
||||
return peerID.hashCode() ^ (2 << _id);
|
||||
@ -134,6 +136,7 @@ public class Peer implements Comparable
|
||||
* Two Peers are equal when they have the same PeerID.
|
||||
* All other properties are ignored.
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object o)
|
||||
{
|
||||
if (o instanceof Peer)
|
||||
|
Reference in New Issue
Block a user