org.npsnet.xrti
Class XRTIParameterHandle

java.lang.Object
  extended byorg.npsnet.xrti.XRTIParameterHandle
All Implemented Interfaces:
ParameterHandle, java.io.Serializable

public class XRTIParameterHandle
extends java.lang.Object
implements ParameterHandle

Type-safe handle for a parameter. Generally these are created by the run-time infrastructure and passed to the user.

Author:
Andrzej Kapolka
See Also:
Serialized Form

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

Constructor Detail

XRTIParameterHandle

protected XRTIParameterHandle(long pIdentifier)
Constructor.

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

Specified by:
equals in interface ParameterHandle
Parameters:
otherParameterHandle - the other parameter handle
Returns:
true if the two handles represent the same parameter, false otherwise

hashCode

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

Specified by:
hashCode in interface ParameterHandle
Returns:
a hash code corresponding to this parameter handle

encodedLength

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

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

encode

public void encode(byte[] buffer,
                   int offset)
Encodes this parameter handle and places the result in the specified buffer.

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

toString

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

Specified by:
toString in interface ParameterHandle
Returns:
a string representation of this parameter handle