j_waste.network
Class GUID

java.lang.Object
  extended byj_waste.network.GUID

public class GUID
extends java.lang.Object

This class represents a globally unique identifier (GUID) in J-WASTE. GUIDs are used to identify conversations over the WASTE network. For instance all packets associated with a specific file transfer will have the same GUID.

Version:
0.1
Author:
Mattias Ek (matek@users.sourceforge.net)

Constructor Summary
GUID(byte[] guid)
          Constructs a new GUID from the specified byte array.
 
Method Summary
 boolean equals(java.lang.Object o)
          Compares the specified Object with this Object for equality.
 byte[] getByteArray()
          Returns a byte array representation of this GUID.
 int hashCode()
          Returns the hash code value for this GUID.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GUID

public GUID(byte[] guid)
Constructs a new GUID from the specified byte array.

Parameters:
guid - the byte array of length 16 representing the GUID.
Method Detail

getByteArray

public byte[] getByteArray()
Returns a byte array representation of this GUID.

Returns:
a byte array representation of this GUID.

equals

public boolean equals(java.lang.Object o)
Compares the specified Object with this Object for equality.

Parameters:
o - The Object to be compared to this Object.
Returns:
true if the objects are equal, false otherwise.

hashCode

public int hashCode()
Returns the hash code value for this GUID.

Returns:
The hash code value for this GUID.