|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectlejos.realtime.HighResolutionTime
lejos.realtime.AbsoluteTime
public class AbsoluteTime
Constructor Summary | |
---|---|
AbsoluteTime()
Equivalent to new AbsoluteTime(0,0). |
|
AbsoluteTime(AbsoluteTime time)
Make a new AbsoluteTime object from the given AbsoluteTime object. |
|
AbsoluteTime(AbsoluteTime time,
Clock clock)
Make a new AbsoluteTime object from the given AbsoluteTime object. |
|
AbsoluteTime(Clock clock)
Equivalent to new AbsoluteTime(0,0,clock). |
|
AbsoluteTime(Date date)
Equivalent to new AbsoluteTime (date.getTime(),0). |
|
AbsoluteTime(Date date,
Clock clock)
Equivalent to new AbsoluteTime (date.getTime(),0,clock). |
|
AbsoluteTime(long millis,
int nanos)
|
|
AbsoluteTime(long millis,
int nanos,
Clock clock)
|
Method Summary | |
---|---|
AbsoluteTime |
absolute(Clock clock)
Convert the time of this to an absolute time, using the given instance of Clock to determine the current time when necessary. |
AbsoluteTime |
absolute(Clock clock,
AbsoluteTime dest)
Convert the time of this to an absolute time, using the given instance of Clock to determine the current time when necessary. |
AbsoluteTime |
add(long millis,
int nanos)
|
AbsoluteTime |
add(long millis,
int nanos,
AbsoluteTime dest)
|
AbsoluteTime |
add(RelativeTime time)
|
AbsoluteTime |
add(RelativeTime time,
AbsoluteTime dest)
|
Date |
getDate()
|
RelativeTime |
relative(Clock clock)
Convert the time of this to a relative time, using the given instance of Clock to determine the current time when necessary. |
RelativeTime |
relative(Clock clock,
RelativeTime dest)
Convert the time of this to a relative time, using the given instance of Clock to determine the current time when necessary. |
void |
set(Date date)
|
RelativeTime |
subtract(AbsoluteTime time)
|
RelativeTime |
subtract(AbsoluteTime time,
RelativeTime dest)
|
AbsoluteTime |
subtract(RelativeTime time)
|
AbsoluteTime |
subtract(RelativeTime time,
AbsoluteTime dest)
|
String |
toString()
|
Methods inherited from class lejos.realtime.HighResolutionTime |
---|
clone, compareTo, compareTo, equals, equals, getClock, getMilliseconds, getNanoseconds, hashCode, set, set, set, waitForObject |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AbsoluteTime()
public AbsoluteTime(AbsoluteTime time)
time
- The AbsoluteTime object which is the source for the copy.
IllegalArgumentException
- Thrown if the time parameter is null.public AbsoluteTime(AbsoluteTime time, Clock clock)
time
- The AbsoluteTime object which is the source for the copy.clock
- The clock providing the association for the newly constructed
object.
IllegalArgumentException
- Thrown if the time parameter is null.public AbsoluteTime(Clock clock)
clock
- The clock providing the association for the newly constructed
object.public AbsoluteTime(Date date)
date
- The java.util.Date representation of the time past the Epoch.
IllegalArgumentException
- Thrown if the date parameter is null.public AbsoluteTime(Date date, Clock clock)
date
- The java.util.Date representation of the time past the Epoch.clock
- The clock providing the association for the newly constructed
object.
IllegalArgumentException
- Thrown if the date parameter is null.public AbsoluteTime(long millis, int nanos)
public AbsoluteTime(long millis, int nanos, Clock clock)
Method Detail |
---|
public AbsoluteTime absolute(Clock clock)
HighResolutionTime
absolute
in class HighResolutionTime
clock
- The instance of Clock used to convert the time of this into
absolute time, and the new clock association for the result.
public AbsoluteTime absolute(Clock clock, AbsoluteTime dest)
HighResolutionTime
absolute
in class HighResolutionTime
clock
- The instance of Clock used to convert the time of this into
absolute time, and the new clock association for the result.dest
- If dest is not null, the result is placed there and returned.
Otherwise, a new object is allocated for the result.
public AbsoluteTime add(long millis, int nanos)
public AbsoluteTime add(long millis, int nanos, AbsoluteTime dest)
public AbsoluteTime add(RelativeTime time)
public AbsoluteTime add(RelativeTime time, AbsoluteTime dest)
public Date getDate()
public RelativeTime relative(Clock clock)
HighResolutionTime
relative
in class HighResolutionTime
clock
- The instance of Clock used to convert the time of this
into relative time, and the new clock association for the result.
public RelativeTime relative(Clock clock, RelativeTime dest)
HighResolutionTime
relative
in class HighResolutionTime
clock
- The instance of Clock used to convert the time of this into
relative time, and the new clock association for the result.dest
- If dest is not null, the result is placed there and returned.
Otherwise, a new object is allocated for the result.
public void set(Date date)
public RelativeTime subtract(AbsoluteTime time)
public RelativeTime subtract(AbsoluteTime time, RelativeTime dest)
public AbsoluteTime subtract(RelativeTime time)
public AbsoluteTime subtract(RelativeTime time, AbsoluteTime dest)
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |