|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--edu.cmu.aura.service.xml.xmlschema.TimeInstant
TimeInstant is the XML Schema primitive type that
represents an instant of time.
Example TimeInstant templates:
yyyy-mm-ddThh:mm:ssZ
yyyy-mm-ddThh:mm:ss.xxZ
yyyy-mm-ddThh:mm:ss-hh:mm
yyyy-mm-ddThh:mm:ss.xxxx-hh:mm
yyyy-mm-ddThh:mm:ss+hh:mm
| Constructor Summary | |
TimeInstant(long millis)
Creates a new TimeInstant from Java time in milliseconds. |
|
TimeInstant(java.lang.String def)
Creates a new TimeInstant from a serialized definition. |
|
| Method Summary | |
long |
convertToMillis()
Get the value of this instant in seconds. |
double |
convertToSeconds()
Get the value of this instant in seconds. |
int |
getDay()
Gets the day field of this instant. |
int |
getHour()
Gets the hour field of this instant. |
int |
getMinute()
Gets the minute field of this instant. |
int |
getMonth()
Gets the month field of this instant. |
double |
getSecond()
Gets the second field of this instant. |
int |
getYear()
Gets the year field of this instant. |
static void |
main(java.lang.String[] args)
|
static int |
parseInt(java.lang.String def)
Allows a + to precede the regular parse int. |
java.lang.String |
toString()
Serialize this TimeInstant in manner that conforms to the XMLSchema TimeInstant definition. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public TimeInstant(java.lang.String def)
throws DataFormatException
def - time instant definitionpublic TimeInstant(long millis)
millis - time in millis| Method Detail |
public static int parseInt(java.lang.String def)
public double getSecond()
public int getMinute()
public int getHour()
public int getDay()
public int getMonth()
public int getYear()
public double convertToSeconds()
public long convertToMillis()
public java.lang.String toString()
toString in class java.lang.Objectpublic static void main(java.lang.String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||