org.npsnet.xrti
Class XRTIObjectClassHandle

java.lang.Object
  extended byorg.npsnet.xrti.XRTIObjectClassHandle
All Implemented Interfaces:
ObjectClassHandle, java.io.Serializable

public class XRTIObjectClassHandle
extends java.lang.Object
implements ObjectClassHandle

Type-safe handle for an object class. Generally these are created by the run-time infrastructure and passed to the user.

Author:
Andrzej Kapolka
See Also:
Serialized Form

Constructor Summary
protected XRTIObjectClassHandle(long pIdentifier)
          Constructor.
 
Method Summary
 void encode(byte[] buffer, int offset)
          Encodes this object handle, placing the result into the specified buffer.
 int encodedLength()
          Returns the encoded length of this object class handle.
 boolean equals(java.lang.Object otherObjectClassHandle)
          Checks this object class 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 object class handle.
 java.lang.String toString()
          Returns a string representation of this object class handle.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XRTIObjectClassHandle

protected XRTIObjectClassHandle(long pIdentifier)
Constructor.

Parameters:
pIdentifier - the object class 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 otherObjectClassHandle)
Checks this object class handle for equality with another.

Specified by:
equals in interface ObjectClassHandle
Parameters:
otherObjectClassHandle - the other object class handle
Returns:
true if the object class handles refer to the same object class, false otherwise

hashCode

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

Specified by:
hashCode in interface ObjectClassHandle
Returns:
a hash code corresponding to this object class handle

encodedLength

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

Specified by:
encodedLength in interface ObjectClassHandle
Returns:
the encoded length of this object class handle (in bytes)

encode

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

Specified by:
encode in interface ObjectClassHandle
Parameters:
buffer - the buffer to contain the encoded value
offset - the offset within the buffer at which to store the encoded value

toString

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

Specified by:
toString in interface ObjectClassHandle
Returns:
a string representation of this object class handle