org.npsnet.xrti.utilities
Class LongValuedLogicalTimeIntervalFactory

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

public class LongValuedLogicalTimeIntervalFactory
extends java.lang.Object
implements LogicalTimeIntervalFactory

A factory for LongValuedLogicalTimeIntervals.

Author:
Andrzej Kapolka
See Also:
Serialized Form

Constructor Summary
LongValuedLogicalTimeIntervalFactory()
           
 
Method Summary
 LogicalTimeInterval decode(byte[] buffer, int offset)
          Decodes a logical time interval stored within the specified buffer, returning a corresponding new LogicalTimeInterval.
 LogicalTimeInterval makeEpsilon()
          Creates and returns an epsilon-length logical time interval.
 LogicalTimeInterval makeZero()
          Creates and returns a zero-length logical time interval.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LongValuedLogicalTimeIntervalFactory

public LongValuedLogicalTimeIntervalFactory()
Method Detail

decode

public LogicalTimeInterval decode(byte[] buffer,
                                  int offset)
                           throws CouldNotDecode
Decodes a logical time interval stored within the specified buffer, returning a corresponding new LogicalTimeInterval.

Specified by:
decode in interface LogicalTimeIntervalFactory
Parameters:
buffer - the buffer containing the encoded interval
offset - the offset within the buffer at which the encoded interval is stored
Returns:
a new LogicalTimeInterval corresponding to the encoded interval
Throws:
CouldNotDecode - if the time interval could not be decoded

makeZero

public LogicalTimeInterval makeZero()
Creates and returns a zero-length logical time interval.

Specified by:
makeZero in interface LogicalTimeIntervalFactory
Returns:
a new zero-length LogicalTimeInterval

makeEpsilon

public LogicalTimeInterval makeEpsilon()
Creates and returns an epsilon-length logical time interval.

Specified by:
makeEpsilon in interface LogicalTimeIntervalFactory
Returns:
a new epsilon-length LogicalTimeInterval