org.eodisp.hla.common.handles
Class UUIDHandle

java.lang.Object
  extended by org.eodisp.hla.common.handles.UUIDHandle
All Implemented Interfaces:
AttributeHandle, FederateHandle, ObjectClassHandle, ObjectInstanceHandle, java.io.Serializable
Direct Known Subclasses:
DimensionHandleImpl, MessageRetractionHandleImpl, RegionHandleImpl

public class UUIDHandle
extends java.lang.Object
implements FederateHandle, ObjectClassHandle, AttributeHandle, ObjectInstanceHandle

Author:
ibirrer
See Also:
Serialized Form

Constructor Summary
UUIDHandle()
           
UUIDHandle(byte[] buffer, int offset)
           
UUIDHandle(java.lang.String s)
           
 
Method Summary
 void encode(byte[] buffer, int offset)
          Returns the byte representation of the UUID.
 int encodedLength()
          TODO: See encode(byte[], int)
 boolean equals(java.lang.Object obj)
           
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UUIDHandle

public UUIDHandle()

UUIDHandle

public UUIDHandle(java.lang.String s)

UUIDHandle

public UUIDHandle(byte[] buffer,
                  int offset)
           throws CouldNotDecode
Throws:
CouldNotDecode
Method Detail

encodedLength

public int encodedLength()
TODO: See encode(byte[], int)

Specified by:
encodedLength in interface AttributeHandle
Specified by:
encodedLength in interface FederateHandle
Specified by:
encodedLength in interface ObjectClassHandle
Specified by:
encodedLength in interface ObjectInstanceHandle

encode

public void encode(byte[] buffer,
                   int offset)
Returns the byte representation of the UUID.

Specified by:
encode in interface AttributeHandle
Specified by:
encode in interface FederateHandle
Specified by:
encode in interface ObjectClassHandle
Specified by:
encode in interface ObjectInstanceHandle

equals

public boolean equals(java.lang.Object obj)
Specified by:
equals in interface AttributeHandle
Specified by:
equals in interface FederateHandle
Specified by:
equals in interface ObjectClassHandle
Specified by:
equals in interface ObjectInstanceHandle
Overrides:
equals in class java.lang.Object
Returns:
true if this refers to the same federate as other handle

hashCode

public int hashCode()
Specified by:
hashCode in interface AttributeHandle
Specified by:
hashCode in interface FederateHandle
Specified by:
hashCode in interface ObjectClassHandle
Specified by:
hashCode in interface ObjectInstanceHandle
Overrides:
hashCode in class java.lang.Object
Returns:
int. All instances that refer to the same federate should return the same hashcode.

toString

public java.lang.String toString()
Specified by:
toString in interface AttributeHandle
Specified by:
toString in interface FederateHandle
Specified by:
toString in interface ObjectClassHandle
Specified by:
toString in interface ObjectInstanceHandle
Overrides:
toString in class java.lang.Object