|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sigh.utils.c_time.TimeFormatString
public class TimeFormatString
TimeFormatString used to create a strftime format string coupled to a long value in milliseconds. This class can then be used with a %t reference from Csprintf.sprintf() or from CTime.strftime() to print a time value based on the Java epoch of 1970 January 1
Constructor Summary | |
---|---|
TimeFormatString()
Default constructor which sets the default format string to %c and sets the time to the instant the objects was created. |
|
TimeFormatString(java.lang.String aStrformatString,
long aLongValue)
TimeFormatString constructor takes two parameters: |
Method Summary | |
---|---|
java.lang.String |
getFormatString()
getFormatString -- getter for the format String (there is no setter other than the constructor). |
long |
getTimeInMilliseconds()
getTimeInMilliseconds -- getter for the long time in milliseconds (there is no setter other than the constructor). |
void |
setFormatStringTo(java.lang.String aFormatString)
Allows user to change the format string for a TimeFormatString object. |
void |
setTimeInMilliseconds(long timeInMilliseconds)
Allows the user to change the time in milliseconds of the TimeFormatString object. |
static java.lang.String |
version()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TimeFormatString() throws java.lang.NullPointerException
java.lang.NullPointerException
public TimeFormatString(java.lang.String aStrformatString, long aLongValue) throws java.lang.NullPointerException
aStrformatString
- -- a strftime() format string as described in KNR.aLongValue
- -- a long value representing the date/time of interest
in milliseconds after 1970 01 01. Negative values
will recede in time. Positive values will advance
in time.
java.lang.NullPointerException
Method Detail |
---|
public void setTimeInMilliseconds(long timeInMilliseconds)
timeInMilliseconds
- public void setFormatStringTo(java.lang.String aFormatString)
aFormatString
- public java.lang.String getFormatString()
public long getTimeInMilliseconds()
public static java.lang.String version()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |