pRTI™ v1.3

hla.rti
Interface LogicalTime

All Known Implementing Classes:
LogicalTimeDouble

public interface LogicalTime

Represents logical time.


Method Summary
 void decreaseBy(LogicalTimeInterval subtrahend)
          Decreses logical time by the specified interval.
 void encode(byte[] buffer, int offset)
          Encodes the logical time to a transportable format.
 int encodedLength()
          Returns the length of the encoded logical time.
 void increaseBy(LogicalTimeInterval addend)
          Increses the logical time by the specified interval.
 boolean isEqualTo(LogicalTime value)
          Checks if times are equal.
 boolean isFinal()
          Checks if the value of time is final (greatest time possible).
 boolean isGreaterThan(LogicalTime value)
          Compares if the time is greater than another time.
 boolean isGreaterThanOrEqualTo(LogicalTime value)
          Compares if the time is greater than or equal to another time.
 boolean isInitial()
          Check if the value of time is initial (lowest time possible).
 boolean isLessThan(LogicalTime value)
          Compares if the time is less than another time.
 boolean isLessThanOrEqualTo(LogicalTime value)
          Compares if the time is less than or equal to another time.
 void setFinal()
          Sets the time to the greatest time possible.
 void setInitial()
          Sets the time to the lowest time possible.
 void setTo(LogicalTime value)
          Sets the time to a specified Logical Time.
 LogicalTimeInterval subtract(LogicalTime subtrahend)
          Decreses logical time by the specified logical time.
 

Method Detail

decreaseBy

public void decreaseBy(LogicalTimeInterval subtrahend)
                throws hla.rti.IllegalTimeArithmetic
Decreses logical time by the specified interval.
Parameters:
subtrahend - Logical time interval

encode

public void encode(byte[] buffer,
                   int offset)
Encodes the logical time to a transportable format.
Parameters:
buffer - The resulting byte array buffer
offset - Start position in the destination data

encodedLength

public int encodedLength()
Returns the length of the encoded logical time.
Returns:
Length of encoded time.

increaseBy

public void increaseBy(LogicalTimeInterval addend)
                throws hla.rti.IllegalTimeArithmetic
Increses the logical time by the specified interval.
Parameters:
addend - Logical Time Interval

isEqualTo

public boolean isEqualTo(LogicalTime value)
Checks if times are equal.
Parameters:
value - Time to compare with.
Returns:
True if equal, false if not.

isFinal

public boolean isFinal()
Checks if the value of time is final (greatest time possible).
Returns:
True if final, false if not.

isGreaterThan

public boolean isGreaterThan(LogicalTime value)
Compares if the time is greater than another time.
Parameters:
value - The logical time to compare with.
Returns:
True if time is greater than the supplied time. False if not.

isGreaterThanOrEqualTo

public boolean isGreaterThanOrEqualTo(LogicalTime value)
Compares if the time is greater than or equal to another time.
Parameters:
value - The logical time to compare with.
Returns:
True if time is greater than or qeual to the supplied time. False if not.

isInitial

public boolean isInitial()
Check if the value of time is initial (lowest time possible).
Returns:
True if time is initial, false otherwise.

isLessThan

public boolean isLessThan(LogicalTime value)
Compares if the time is less than another time.
Parameters:
value - The logical time to compare with.
Returns:
True if time is less than the supplied time. False if not.

isLessThanOrEqualTo

public boolean isLessThanOrEqualTo(LogicalTime value)
Compares if the time is less than or equal to another time.
Parameters:
value - The logical time to compare with.
Returns:
True if time is less than or qeual to the supplied time. False if not.

setFinal

public void setFinal()
Sets the time to the greatest time possible.

setInitial

public void setInitial()
Sets the time to the lowest time possible.

setTo

public void setTo(LogicalTime value)
Sets the time to a specified Logical Time.
Parameters:
value - Logical Time

subtract

public LogicalTimeInterval subtract(LogicalTime subtrahend)
Decreses logical time by the specified logical time.
Parameters:
subtrahend - Logical time

pRTI™ v1.3

Visit the pRTI™ Website

pRTI is a trademark of Pitch Technologies AB

Repslagaregatan 25
S-582 22 Linkoping,
Sweden.
All Rights Reserved.