|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface TimeClock
This interface represents more than a "Time Zone", but a complete calendar, a complete lunar cycle, and schedule for days and nights. Oh, and it also manages the current date and time.
Area.setTimeObj(TimeClock),
Area.getTimeObj()| Field Summary | |
|---|---|
static java.lang.String[] |
MOON_PHASES
The Moon Phase Constant MOON_PHASES, with long sentence descriptions of the various phases. |
static int |
PHASE_BLUE
The Moon Phase Constant PHASE_BLUE. |
static java.lang.String[] |
PHASE_DESC
The Moon Phase Constant PHASE_DESC, holding the coded short values of the moon phases. |
static int |
PHASE_FULL
The Moon Phase Constant PHASE_FULL. |
static int |
PHASE_NEW
The Moon Phase Constant PHASE_NEW. |
static int |
PHASE_WANDEQUARTER
The Moon Phase Constant PHASE_WANDEQUARTER. |
static int |
PHASE_WANECRESCENT
The Moon Phase Constant PHASE_WANECRESCENT. |
static int |
PHASE_WANEGIBBOUS
The Moon Phase Constant PHASE_WANEGIBBOUS. |
static int |
PHASE_WAXCRESCENT
The Moon Phase Constant PHASE_WAXCRESCENT. |
static int |
PHASE_WAXGIBBOUS
The Moon Phase Constant PHASE_WAXGIBBOUS. |
static int |
PHASE_WAXQUARTER
The Moon Phase Constant PHASE_WAXQUARTER. |
static java.lang.String[] |
SEASON_DESCS
The Season Constant SEASON_DESCS, with the string word name of each season. |
static int |
SEASON_FALL
The Season Constant SEASON_FALL. |
static int |
SEASON_SPRING
The Season Constant SEASON_SPRING. |
static int |
SEASON_SUMMER
The Season Constant SEASON_SUMMER. |
static int |
SEASON_WINTER
The Season Constant SEASON_WINTER. |
static int |
TIME_DAWN
The Time Of Day (TOD) Constant TIME_DAWN. |
static int |
TIME_DAY
The Time Of Day (TOD) Constant TIME_DAY. |
static int |
TIME_DUSK
The Time Of Day (TOD) Constant TIME_DUSK. |
static int |
TIME_NIGHT
The Time Of Day (TOD) Constant TIME_NIGHT. |
static java.lang.String[] |
TOD_DESC
The Constant TOD_DESC, with a sentence description of each sun-orientation (time of day). |
| Method Summary | |
|---|---|
TimeClock |
deriveClock(long millis)
Using the current time and date as a yardstick, and assuming constant running and perfect timing, this method will derive a mud date and time from the given real life date/time in milliseconds. |
java.lang.String |
deriveEllapsedTimeString(long millis)
Using the given number of milliseconds, this method will return a string describing the number of mud days, hours, etc that is represented by that amount of real time, assuming constant running and perfect timing. |
long |
deriveMillisAfter(TimeClock C)
This method will discover the difference in mud hours between this time clock and the given EARLIER clock, assuming they use the same scale of measurement. |
int[] |
getDawnToDusk()
Gets the dawn to dusk values, indexed by the TOD constants. |
int |
getDayOfMonth()
Gets the current day of month. |
int |
getDaysInMonth()
Gets the days in a month. |
int |
getDaysInWeek()
Gets the number of days in each week |
int |
getHoursInDay()
Gets the hours in a day. |
int |
getMonth()
Gets the current month. |
java.lang.String[] |
getMonthNames()
Gets the month names, in order, indexed by 0. |
int |
getMonthsInYear()
Gets the months in a year. |
int |
getMoonPhase()
Gets the moon phase an an enumeration. |
int |
getSeasonCode()
Gets the season code. |
java.lang.String |
getShortestTimeDescription()
Gets the shortest time description, showing only the date and time in brief numeric format. |
java.lang.String |
getShortTimeDescription()
Gets a shorter time description, showing the date and time in full sentence format, but skipping lunar orientation. |
int |
getTimeOfDay()
Gets the current time of day (the hour). |
int |
getTODCode()
Gets the TOD code, which is the sun-orientation (morning, evening, etc) |
java.lang.String[] |
getWeekNames()
Gets the week names, which is the names of the days of each week, a string array indexed by the day of the week - 1. |
int |
getYear()
Gets the current year. |
java.lang.String[] |
getYearNames()
Gets the names of the year, an arbitrary sized list that is rotated through from year to year. |
void |
initializeINIClock(CMProps page)
Initialize ini clock by reading calendar values from the given properties page. |
void |
save()
Saves the current time/date information where ever its supposed to be saved. |
void |
setDawnToDusk(int dawn,
int day,
int dusk,
int night)
Sets the dawn to dusk values as absolute hours when that particular time of day begins. |
void |
setDayOfMonth(int d)
Sets the current day of month. |
void |
setDaysInMonth(int d)
Sets the days in a month. |
void |
setDaysInWeek(java.lang.String[] days)
Sets the number of days in each week by naming each of them in a string array |
void |
setHoursInDay(int h)
Sets the hours in a day. |
void |
setLoadName(java.lang.String name)
Sets the name of this time object for the purposes of database loading and saving. |
void |
setMonth(int m)
Sets the current month. |
void |
setMonthsInYear(java.lang.String[] months)
Sets the months in year as a string array of names, arranged in order. |
boolean |
setTimeOfDay(int t)
Sets the time of day (the hour). |
void |
setYear(int y)
Sets the current year. |
void |
setYearNames(java.lang.String[] years)
Sets the year names, which is an arbitrary sized list that is rotated through from year to year. |
void |
tickTock(int howManyHours)
Alters the time/day by the given number of hours (forward or backward) |
java.lang.String |
timeDescription(MOB mob,
Room room)
Returns a complete description of the date, time, and lunar orientation, and day of the week in a full sentence word format. |
| Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Tickable |
|---|
getTickStatus, name, tick |
| Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.CMObject |
|---|
copyOf, ID, initializeClass, newInstance |
| Methods inherited from interface java.lang.Comparable |
|---|
compareTo |
| Field Detail |
|---|
static final java.lang.String[] MOON_PHASES
static final int PHASE_NEW
static final int PHASE_WAXCRESCENT
static final int PHASE_WAXQUARTER
static final int PHASE_WAXGIBBOUS
static final int PHASE_FULL
static final int PHASE_WANEGIBBOUS
static final int PHASE_WANDEQUARTER
static final int PHASE_WANECRESCENT
static final int PHASE_BLUE
static final java.lang.String[] PHASE_DESC
static final java.lang.String[] TOD_DESC
static final int TIME_DAWN
static final int TIME_DAY
static final int TIME_DUSK
static final int TIME_NIGHT
static final int SEASON_SPRING
static final int SEASON_SUMMER
static final int SEASON_FALL
static final int SEASON_WINTER
static final java.lang.String[] SEASON_DESCS
| Method Detail |
|---|
java.lang.String timeDescription(MOB mob,
Room room)
mob - the mob who wants to know the timeroom - the room the room where the mob is wanting the time
getShortTimeDescription(),
getShortestTimeDescription()java.lang.String getShortTimeDescription()
timeDescription(MOB, Room),
getShortestTimeDescription()java.lang.String getShortestTimeDescription()
timeDescription(MOB, Room),
getShortTimeDescription()int getYear()
setYear(int)void setYear(int y)
y - the new yeargetYear()int getMonth()
setMonth(int)void setMonth(int m)
m - the new monthgetMonth()int getDayOfMonth()
setDayOfMonth(int)void setDayOfMonth(int d)
d - the new day of monthgetDayOfMonth()int getTimeOfDay()
setTimeOfDay(int)boolean setTimeOfDay(int t)
t - the time of day (the hour)
getTimeOfDay()int getTODCode()
setTimeOfDay(int),
setDawnToDusk(int, int, int, int),
TIME_DAWN,
TIME_DUSK,
TIME_DAY,
TIME_NIGHT,
TOD_DESCint getMoonPhase()
MOON_PHASES,
PHASE_DESC,
PHASE_FULL,
PHASE_NEWint getSeasonCode()
SEASON_DESCS,
SEASON_FALL,
SEASON_SPRING,
SEASON_SUMMER,
SEASON_WINTERvoid tickTock(int howManyHours)
howManyHours - the how many hours to alter the time byvoid save()
setLoadName(String)void setLoadName(java.lang.String name)
name - the new load namesave()int getHoursInDay()
setHoursInDay(int)void setHoursInDay(int h)
h - the new hours in a daygetHoursInDay()int getDaysInMonth()
setDaysInMonth(int)void setDaysInMonth(int d)
d - the new days in a monthgetDaysInMonth()int getMonthsInYear()
setMonthsInYear(String[]),
getMonthNames()java.lang.String[] getMonthNames()
setMonthsInYear(String[]),
getMonthNames()void setMonthsInYear(java.lang.String[] months)
months - the new month names in a yeargetMonthNames(),
getMonthsInYear()int[] getDawnToDusk()
getTODCode(),
setDawnToDusk(int, int, int, int),
TIME_DAWN,
TIME_DUSK,
TIME_DAY,
TIME_NIGHT,
TOD_DESC
void setDawnToDusk(int dawn,
int day,
int dusk,
int night)
dawn - the dawn hourday - the day hourdusk - the dusk hournight - the night hourgetDawnToDusk(),
getTODCode(),
TIME_DAWN,
TIME_DUSK,
TIME_DAY,
TIME_NIGHT,
TOD_DESCjava.lang.String[] getWeekNames()
setDaysInWeek(String[]),
getDaysInWeek()int getDaysInWeek()
setDaysInWeek(String[]),
getWeekNames()void setDaysInWeek(java.lang.String[] days)
days - the new days in each week string arraygetDaysInWeek(),
getWeekNames()java.lang.String[] getYearNames()
setYearNames(String[])void setYearNames(java.lang.String[] years)
years - the new years namesgetYearNames()TimeClock deriveClock(long millis)
millis - the milliseconds since 1970
deriveMillisAfter(TimeClock),
deriveEllapsedTimeString(long)long deriveMillisAfter(TimeClock C)
C - the earlier time clock object
deriveClock(long),
deriveEllapsedTimeString(long)java.lang.String deriveEllapsedTimeString(long millis)
millis - the milliseconds of elapsed time represented
deriveMillisAfter(TimeClock),
deriveClock(long)void initializeINIClock(CMProps page)
page - the properties page
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||