|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Calendar
java.util.GregorianCalendar
org.mars_sim.msp.simulation.time.EarthClock
public class EarthClock
The EarthClock class keeps track of Earth Universal Time. It should be synchronized with the Mars clock.
Field Summary |
---|
Fields inherited from class java.util.GregorianCalendar |
---|
AD, BC |
Fields inherited from class java.util.Calendar |
---|
ALL_STYLES, AM, AM_PM, APRIL, areFieldsSet, AUGUST, DATE, DAY_OF_MONTH, DAY_OF_WEEK, DAY_OF_WEEK_IN_MONTH, DAY_OF_YEAR, DECEMBER, DST_OFFSET, ERA, FEBRUARY, FIELD_COUNT, fields, FRIDAY, HOUR, HOUR_OF_DAY, isSet, isTimeSet, JANUARY, JULY, JUNE, LONG, MARCH, MAY, MILLISECOND, MINUTE, MONDAY, MONTH, NOVEMBER, OCTOBER, PM, SATURDAY, SECOND, SEPTEMBER, SHORT, SUNDAY, THURSDAY, time, TUESDAY, UNDECIMBER, WEDNESDAY, WEEK_OF_MONTH, WEEK_OF_YEAR, YEAR, ZONE_OFFSET |
Constructor Summary | |
---|---|
EarthClock(java.lang.String dateString)
Constructor |
Method Summary | |
---|---|
void |
addTime(double seconds)
Adds time to the calendar |
java.lang.String |
getTimeStamp()
Returns the date/time formatted in a string |
java.lang.String |
toString()
Displays the string version of the clock. |
Methods inherited from class java.util.GregorianCalendar |
---|
add, clone, computeFields, computeTime, equals, getActualMaximum, getActualMinimum, getGreatestMinimum, getGregorianChange, getLeastMaximum, getMaximum, getMinimum, getTimeZone, hashCode, isLeapYear, roll, roll, setGregorianChange, setTimeZone |
Methods inherited from class java.util.Calendar |
---|
after, before, clear, clear, compareTo, complete, get, getAvailableLocales, getDisplayName, getDisplayNames, getFirstDayOfWeek, getInstance, getInstance, getInstance, getInstance, getMinimalDaysInFirstWeek, getTime, getTimeInMillis, internalGet, isLenient, isSet, set, set, set, set, setFirstDayOfWeek, setLenient, setMinimalDaysInFirstWeek, setTime, setTimeInMillis |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public EarthClock(java.lang.String dateString) throws java.lang.Exception
dateString
- the UT date string in format: "MM/dd/yyyy hh:mm:ss".
java.lang.Exception
- if date string is invalid.Method Detail |
---|
public java.lang.String getTimeStamp()
public void addTime(double seconds)
seconds
- seconds added to the calendarpublic java.lang.String toString()
toString
in class java.util.Calendar
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |