org.npsnet.xrti.utilities
Class DoubleValuedLogicalTimeIntervalFactory

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

public class DoubleValuedLogicalTimeIntervalFactory
extends java.lang.Object
implements LogicalTimeIntervalFactory

A factory for DoubleValuedLogicalTimeIntervals.

Author:
Stanislav Kozina
See Also:
Serialized Form

Constructor Summary
DoubleValuedLogicalTimeIntervalFactory()
           
 
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

DoubleValuedLogicalTimeIntervalFactory

public DoubleValuedLogicalTimeIntervalFactory()
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