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:
sponge
2009-08-11 21:58:56 +00:00
parent e5eea47b66
commit 3fbff71861
166 changed files with 2575 additions and 2417 deletions

View File

@ -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)