org.npsnet.xrti
Class XRTIInteractionClassHandle

java.lang.Object
  extended byorg.npsnet.xrti.XRTIInteractionClassHandle
All Implemented Interfaces:
InteractionClassHandle, java.io.Serializable

public class XRTIInteractionClassHandle
extends java.lang.Object
implements InteractionClassHandle

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

Author:
Andrzej Kapolka
See Also:
Serialized Form

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

Field Detail

identifier

private long identifier
The interaction class identifier.

Constructor Detail

XRTIInteractionClassHandle

protected XRTIInteractionClassHandle(long pIdentifier)
Constructor.

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

Specified by:
equals in interface InteractionClassHandle
Parameters:
otherInteractionClassHandle - the other interaction class handle to compare this to
Returns:
true if this refers to the same interaction class as other handle, false otherwise

hashCode

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

Specified by:
hashCode in interface InteractionClassHandle
Returns:
a hash code corresponding to this interaction class

encodedLength

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

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

encode

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

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

toString

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

Specified by:
toString in interface InteractionClassHandle
Returns:
a string representation of this interaction class handle