org.npsnet.xrti.utilities
Class LongValuedLogicalTimeFactory

java.lang.Object
  extended byorg.npsnet.xrti.utilities.LongValuedLogicalTimeFactory
All Implemented Interfaces:
LogicalTimeFactory, java.io.Serializable

public class LongValuedLogicalTimeFactory
extends java.lang.Object
implements LogicalTimeFactory

A factory for LongValuedLogicalTimes.

Author:
Andrzej Kapolka
See Also:
Serialized Form

Constructor Summary
LongValuedLogicalTimeFactory()
           
 
Method Summary
 LogicalTime decode(byte[] buffer, int offset)
          Decodes a logical time stored within the specified buffer, returning a LogicalTime object corresponding to the decoded value.
 LogicalTime makeFinal()
          Creates and returns an instance of the final logical time.
 LogicalTime makeInitial()
          Creates and returns an instance of the initial logical time.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LongValuedLogicalTimeFactory

public LongValuedLogicalTimeFactory()
Method Detail

decode

public LogicalTime decode(byte[] buffer,
                          int offset)
                   throws CouldNotDecode
Decodes a logical time stored within the specified buffer, returning a LogicalTime object corresponding to the decoded value.

Specified by:
decode in interface LogicalTimeFactory
Parameters:
buffer - the buffer that contains the encoded value
offset - the offset within the buffer at which the encoded value is stored
Returns:
a new LogicalTime representing the decoded value
Throws:
CouldNotDecode - if the value could not be decoded

makeInitial

public LogicalTime makeInitial()
Creates and returns an instance of the initial logical time.

Specified by:
makeInitial in interface LogicalTimeFactory
Returns:
an instance of the initial logical time

makeFinal

public LogicalTime makeFinal()
Creates and returns an instance of the final logical time.

Specified by:
makeFinal in interface LogicalTimeFactory
Returns:
an instance of the final logical time