- All Superinterfaces:
Comparable<HLAinteger64Time>,LogicalTime<HLAinteger64Time,,HLAinteger64Interval> Serializable
Interface for the time part of the standardized time type HLAinteger64Time.
-
Method Summary
Modifier and TypeMethodDescriptionadd(HLAinteger64Interval val) Returns a LogicalTime whose value is (this + val).intcompareTo(HLAinteger64Time other) Compares this object with the specified object for order.distance(HLAinteger64Time val) Returns a LogicalTimeInterval whose value is the time interval between this and val.voidencode(byte[] buffer, int offset) Encodes this object in the specified buffer starting at the specified offset.intReturns the size of the buffer required to encode this object.longgetValue()booleanisFinal()Returns true is this time is equal to the final time.booleanReturns true is this time is equal to the initial time.Returns a LogicalTime whose value is (this - val).Methods inherited from interface hla.rti1516e.LogicalTime
equals, hashCode, toString
-
Method Details
-
isInitial
boolean isInitial()Description copied from interface:LogicalTimeReturns true is this time is equal to the initial time.- Specified by:
isInitialin interfaceLogicalTime<HLAinteger64Time,HLAinteger64Interval> - Returns:
- true if initial value.
-
isFinal
boolean isFinal()Description copied from interface:LogicalTimeReturns true is this time is equal to the final time.- Specified by:
isFinalin interfaceLogicalTime<HLAinteger64Time,HLAinteger64Interval> - Returns:
- true if final value.
-
add
Description copied from interface:LogicalTimeReturns a LogicalTime whose value is (this + val). The returned value shall be different from this value if the specified interval != 0.- Specified by:
addin interfaceLogicalTime<HLAinteger64Time,HLAinteger64Interval> - Parameters:
val- interval to add.- Returns:
- new time value.
- Throws:
IllegalTimeArithmetic
-
subtract
Description copied from interface:LogicalTimeReturns a LogicalTime whose value is (this - val). The returned value shall be different from this value if the specified interval != 0.- Specified by:
subtractin interfaceLogicalTime<HLAinteger64Time,HLAinteger64Interval> - Parameters:
val- interval to subtract.- Returns:
- new time value.
- Throws:
IllegalTimeArithmetic
-
distance
Description copied from interface:LogicalTimeReturns a LogicalTimeInterval whose value is the time interval between this and val.- Specified by:
distancein interfaceLogicalTime<HLAinteger64Time,HLAinteger64Interval> - Parameters:
val- other time.- Returns:
- distance between times.
-
compareTo
Description copied from interface:LogicalTimeCompares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.- Specified by:
compareToin interfaceComparable<HLAinteger64Time>- Specified by:
compareToin interfaceLogicalTime<HLAinteger64Time,HLAinteger64Interval> - Parameters:
other- the Object to be compared.- Returns:
- a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
-
encodedLength
int encodedLength()Description copied from interface:LogicalTimeReturns the size of the buffer required to encode this object.- Specified by:
encodedLengthin interfaceLogicalTime<HLAinteger64Time,HLAinteger64Interval> - Returns:
- size of buffer.
-
encode
Description copied from interface:LogicalTimeEncodes this object in the specified buffer starting at the specified offset.- Specified by:
encodein interfaceLogicalTime<HLAinteger64Time,HLAinteger64Interval> - Parameters:
buffer- the buffer to encode into.offset- the offset where to start encoding.- Throws:
CouldNotEncode
-
getValue
long getValue()
-