|
Jamaica 6.4 release 1
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.realtime.HighResolutionTime
javax.realtime.AbsoluteTime
public class AbsoluteTime
Jamaica Real-Time Specification for Java class AbsoluteTime.
This class represents an absolute point in the time represented by a Clock.
| Constructor Summary | |
|---|---|
AbsoluteTime()
Constructor to create absolute time 0ms, 0ns. |
|
AbsoluteTime(AbsoluteTime time)
Constructor to create an absolute time with millis and nanos taken from an existing absolute time. |
|
AbsoluteTime(AbsoluteTime time,
Clock clock)
Constructor to create an absolute time with millis and nanos taken from an existing absolute time. |
|
AbsoluteTime(Clock clock)
Constructor to create absolute time 0ms, 0ns with given clock association. |
|
AbsoluteTime(Date date)
Constructor to create an absolute time from a time represented by an instance of Date. |
|
AbsoluteTime(Date date,
Clock clock)
Constructor to create an absolute time from a time represented by an instance of Date. |
|
AbsoluteTime(long millis,
int nanos)
Constructor to create an absolute time from given milli and nano seconds. |
|
AbsoluteTime(long millis,
int nanos,
Clock clock)
Constructor to create an absolute time from given milli and nano seconds. |
|
| Method Summary | |
|---|---|
AbsoluteTime |
absolute(Clock clock)
absolute implements abstract method inherited from HighResolutionTime. |
AbsoluteTime |
absolute(Clock clock,
AbsoluteTime dest)
absolute implements abstract method inherited from HighResolutionTime. |
AbsoluteTime |
add(long millis,
int nanos)
add adds time given in milliseconds and nanoseconds to this absolute time. |
AbsoluteTime |
add(long millis,
int nanos,
AbsoluteTime dest)
add adds time given in milliseconds and nanoseconds to this absolute time. |
AbsoluteTime |
add(RelativeTime time)
add adds interval given as RelativeTime instance to this absolute time. |
AbsoluteTime |
add(RelativeTime time,
AbsoluteTime dest)
add adds interval given as RelativeTime instance to this absolute time. |
Date |
getDate()
getDate converts this absolute time to an instance of Date that represents the same time. |
RelativeTime |
relative(Clock clock)
relative implements abstract method inherited from HighResolutionTime. |
RelativeTime |
relative(Clock clock,
RelativeTime dest)
relative implements abstract method inherited from HighResolutionTime. |
void |
set(Date date)
set sets the time represented by this to the time represented by an instance of Date. |
RelativeTime |
subtract(AbsoluteTime time)
subtract subtracts another absolute time from this absolute time. |
RelativeTime |
subtract(AbsoluteTime time,
RelativeTime dest)
subtract subtracts another absolute time from this absolute time. |
AbsoluteTime |
subtract(RelativeTime time)
subtract subtracts an interval given as an instance of RelativeTime from this. |
AbsoluteTime |
subtract(RelativeTime time,
AbsoluteTime dest)
subtract subtracts an interval given as an instance of RelativeTime from this. |
String |
toString()
toString converts this to a String |
| Methods inherited from class javax.realtime.HighResolutionTime |
|---|
clone, compareTo, compareTo, equals, equals, getClock, getMilliseconds, getNanoseconds, hashCode, set, set, set, waitForObject |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AbsoluteTime()
public AbsoluteTime(AbsoluteTime time)
time - the original absolute time, must not be null.public AbsoluteTime(Date date)
date - the original Date, must not be null.
public AbsoluteTime(long millis,
int nanos)
ensure
(this.getMilliseconds() == millis,
this.getNanosecondes() == nanos);
millis - the milliseconds value for the new absolute time.nanos - the nanoseconds value for the new absolute time.public AbsoluteTime(Clock clock)
clock - the clock to be associated with this time,
Clock.getRealtimeClock if null.
public AbsoluteTime(AbsoluteTime time,
Clock clock)
time - the original absolute time, must not be null.clock - the clock to be associated with this time,
Clock.getRealtimeClock if null.
public AbsoluteTime(Date date,
Clock clock)
date - the original Date, must not be null.clock - the clock to be associated with this time,
Clock.getRealtimeClock if null.
public AbsoluteTime(long millis,
int nanos,
Clock clock)
ensure
(this.getMilliseconds() == millis,
this.getNanosecondes() == nanos);
millis - the milliseconds value for the new absolute time.nanos - the nanoseconds value for the new absolute time.clock - the clock to be associated with this time,
Clock.getRealtimeClock if null.| Method Detail |
|---|
public AbsoluteTime absolute(Clock clock,
AbsoluteTime dest)
For AbsoluteTime, the result is this iff dest is null.
absolute in class HighResolutionTimeclock - The clock the result should be relative to.dest - The preallocated AbsoluteTime object to hold the
result. May be null to indicate that a new object should be
allocated.
public AbsoluteTime absolute(Clock clock)
For AbsoluteTime, the result is this iff dest is null.
absolute in class HighResolutionTimeclock - The clock the result should be relative to.
public AbsoluteTime add(long millis,
int nanos)
millis - the milliseconds part of the interval to be added.nanos - the nanoseconds part of the interval to be added.
public AbsoluteTime add(long millis,
int nanos,
AbsoluteTime dest)
millis - the milliseconds part of the interval to be added.nanos - the nanoseconds part of the interval to be added.dest - The preallocated AbsoluteTime object to hold the
result. May be null to indicate that a new object should be
allocated.
public AbsoluteTime add(RelativeTime time)
time - the interval to be added
public AbsoluteTime add(RelativeTime time,
AbsoluteTime dest)
time - the interval to be addeddest - The preallocated AbsoluteTime object to hold the
result. May be null to indicate that a new object should be
allocated.
public Date getDate()
public void set(Date date)
date - an instance of Date, must not be null.public RelativeTime subtract(AbsoluteTime time)
time - the other absolute time.
public RelativeTime subtract(AbsoluteTime time,
RelativeTime dest)
time - the other absolute time.dest - The preallocated RelativeTime object to hold the
result. May be null to indicate that a new object should be
allocated.
public AbsoluteTime subtract(RelativeTime time)
time - the interval to be subtracted.
public AbsoluteTime subtract(RelativeTime time,
AbsoluteTime dest)
time - the interval to be subtracted.dest - The preallocated RelativeTime object to hold the
result. May be null to indicate that a new object should be
allocated.
public String toString()
toString in class Objectpublic RelativeTime relative(Clock clock)
relative in class HighResolutionTimeclock - The clock the result should be relative to.
public RelativeTime relative(Clock clock,
RelativeTime dest)
relative in class HighResolutionTimeclock - The clock the result should be relative to.dest - The preallocated RelativeTime object to hold the
result. May be null to indicate that a new object should be
allocated.
|
Jamaica 6.4 release 1
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||