org.npsnet.xrti
Class XRTIDimensionHandle

java.lang.Object
  extended byorg.npsnet.xrti.XRTIDimensionHandle
All Implemented Interfaces:
DimensionHandle, java.io.Serializable

public class XRTIDimensionHandle
extends java.lang.Object
implements DimensionHandle

Type-safe handle for a dimension. Generally these are created by the RTI and passed to the user.

Author:
Andrzej Kapolka
See Also:
Serialized Form

Constructor Summary
protected XRTIDimensionHandle(long pIdentifier)
          Constructor.
 
Method Summary
 void encode(byte[] buffer, int offset)
          Encodes this dimension handle, placing the result into the specified buffer.
 int encodedLength()
          Returns the encoded length of this dimension handle.
 boolean equals(java.lang.Object otherDimensionHandle)
          Checks this dimension handle for equality with another.
protected  long getIdentifier()
          Returns this handle's unique identifier.
 int hashCode()
          Computes and returns a hash code corresponding to this dimension handle.
 java.lang.String toString()
          Returns a string representation of this dimension handle.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XRTIDimensionHandle

protected XRTIDimensionHandle(long pIdentifier)
Constructor.

Parameters:
pIdentifier - the dimension identifier
Method Detail

getIdentifier

protected long getIdentifier()
Returns this handle's unique identifier.

Returns:
this handle's unique identifier

equals

public boolean equals(java.lang.Object otherDimensionHandle)
Checks this dimension handle for equality with another.

Specified by:
equals in interface DimensionHandle
Parameters:
otherDimensionHandle - the dimension handle to compare this to
Returns:
true if this refers to the same dimension as the other handle, false otherwise

hashCode

public int hashCode()
Computes and returns a hash code corresponding to this dimension handle.

Specified by:
hashCode in interface DimensionHandle
Returns:
the hash code corresponding to this dimension handle

encodedLength

public int encodedLength()
Returns the encoded length of this dimension handle.

Specified by:
encodedLength in interface DimensionHandle
Returns:
the encoded length of this dimension handle (in bytes)

encode

public void encode(byte[] buffer,
                   int offset)
Encodes this dimension handle, placing the result into the specified buffer.

Specified by:
encode in interface DimensionHandle
Parameters:
buffer - the buffer to contain the encoded dimension handle
offset - the offset within the buffer at which to place the encoded dimension handle

toString

public java.lang.String toString()
Returns a string representation of this dimension handle.

Specified by:
toString in interface DimensionHandle
Returns:
a string representation of this dimension handle