hla.rti
Class TransportationType

java.lang.Object
  extended byhla.rti.TransportationType
All Implemented Interfaces:
java.io.Serializable

public class TransportationType
extends java.lang.Object
implements java.io.Serializable

Represents a transportation type.

Author:
DMSO
See Also:
Serialized Form

Field Summary
static TransportationType HLA_BEST_EFFORT
          The best-effort transportation type.
static TransportationType HLA_RELIABLE
          The reliable transportation type.
 
Constructor Summary
TransportationType(TransportationType otherTransportationType)
          Copy constructor.
 
Method Summary
static TransportationType decode(byte[] buffer, int offset)
          Decodes a transportation type stored within the specified buffer and returns a corresponding TransportationType instance.
 void encode(byte[] buffer, int offset)
          Encodes this transportation type, placing the result into the specified buffer.
 int encodedLength()
          Returns the encoded length of this transportation type.
 boolean equals(java.lang.Object otherTransportationType)
          Compares this transportation type for equality with another.
 int hashCode()
          Computes and returns a hash code corresponding to this transportation type.
 java.lang.String toString()
          Returns a string representation of this transportation type.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

HLA_RELIABLE

public static final TransportationType HLA_RELIABLE
The reliable transportation type.


HLA_BEST_EFFORT

public static final TransportationType HLA_BEST_EFFORT
The best-effort transportation type.

Constructor Detail

TransportationType

public TransportationType(TransportationType otherTransportationType)
Copy constructor.

Parameters:
otherTransportationType - the transportation type to copy
Method Detail

decode

public static TransportationType decode(byte[] buffer,
                                        int offset)
                                 throws CouldNotDecode
Decodes a transportation type stored within the specified buffer and returns a corresponding TransportationType instance.

Parameters:
buffer - the buffer in which the encoded value is stored
offset - the offset within the buffer at which the encoded value is located
Returns:
an TransportationType corresponding to the decoded value
Throws:
CouldNotDecode - if the transportation type could not be decoded

equals

public boolean equals(java.lang.Object otherTransportationType)
Compares this transportation type for equality with another.

Parameters:
otherTransportationType - the other transportation type
Returns:
true if the two transportation types are equal, false otherwise

hashCode

public int hashCode()
Computes and returns a hash code corresponding to this transportation type.

Returns:
a hash code corresponding to this transportation type

encodedLength

public int encodedLength()
Returns the encoded length of this transportation type.

Returns:
the encoded length of this transportation type (in bytes)

encode

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

Parameters:
buffer - the buffer in which to place 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 transportation type.

Returns:
a string representation of this transportation type