Public Member Functions | |
TimeDuration () | |
TimeDuration (long l) | |
void | setYear (short year) |
void | setMonth (short month) |
void | setDay (short day) |
void | setHour (short hour) |
void | setMinute (short minute) |
void | setSeconds (short second) |
void | setMilli (short milli) |
void | setNegative () |
void | setValue (short year, short month, short day, short hour, short minute, short second, short millisecond) |
short | getYear () |
short | getMonth () |
short | getDay () |
short | getHour () |
short | getMinute () |
short | getSeconds () |
short | getMilli () |
boolean | isNegative () |
long | toLong () |
String | toString () |
boolean | equals (Object object) |
boolean | equal (TimeDuration timeD) |
boolean | isGreater (TimeDuration timeD) |
Static Public Member Functions | |
static Object | parse (String str) throws ParseException |
static TimeDuration | parseTimeDuration (String str) throws ParseException |
Represents the timeDuration XML Schema type.
This representation does not support the decimal fraction for the lowest order item. Besides setting TimeDuration to '0' is not possible thus there is no distinction between '0' and 'P0Y'
org.exolab.castor.types.TimeDuration.TimeDuration | ( | ) |
default constructor
Referenced by org.exolab.castor.types.TimeDuration.parseTimeDuration().
org.exolab.castor.types.TimeDuration.TimeDuration | ( | long | l | ) |
This constructor fills in the time duration fields according to the value of the long by calling setValue
References org.exolab.castor.types.TimeDuration.setNegative(), and org.exolab.castor.types.TimeDuration.setValue().
boolean org.exolab.castor.types.TimeDuration.equal | ( | TimeDuration | timeD | ) |
Returns true if the instance of TimeDuration has the same fields of the parameter
timeD | the time duration to compare |
References org.exolab.castor.types.TimeDuration.getDay(), org.exolab.castor.types.TimeDuration.getHour(), org.exolab.castor.types.TimeDuration.getMinute(), org.exolab.castor.types.TimeDuration.getMonth(), org.exolab.castor.types.TimeDuration.getSeconds(), org.exolab.castor.types.TimeDuration.getYear(), and org.exolab.castor.types.TimeDuration.isNegative().
Referenced by org.exolab.castor.types.TimeDuration.equals().
boolean org.exolab.castor.types.TimeDuration.equals | ( | Object | object | ) |
Override the java.lang.equals method
References org.exolab.castor.types.TimeDuration.equal().
Referenced by org.exolab.castor.types.RecurringDurationBase.equal(), org.exolab.castor.types.RecurringDuration.equal(), org.exolab.castor.types.RecurringDurationBase.isGreater(), and org.exolab.castor.types.RecurringDuration.isGreater().
short org.exolab.castor.types.TimeDuration.getDay | ( | ) |
short org.exolab.castor.types.TimeDuration.getHour | ( | ) |
short org.exolab.castor.types.TimeDuration.getMilli | ( | ) |
short org.exolab.castor.types.TimeDuration.getMinute | ( | ) |
short org.exolab.castor.types.TimeDuration.getMonth | ( | ) |
short org.exolab.castor.types.TimeDuration.getSeconds | ( | ) |
short org.exolab.castor.types.TimeDuration.getYear | ( | ) |
boolean org.exolab.castor.types.TimeDuration.isGreater | ( | TimeDuration | timeD | ) |
Returns true if the present instance of TimeDuration is greater than the parameter
Note This definition does not follow the XML SCHEMA DRAFT 20001024 the following orger relation is used : t1,t2 timeDuration types t1>t2 iff t1.toLong()>t2.toLong()
timeD | the time duration to compare with the present instance |
References org.exolab.castor.types.TimeDuration.toLong().
boolean org.exolab.castor.types.TimeDuration.isNegative | ( | ) |
static Object org.exolab.castor.types.TimeDuration.parse | ( | String | str | ) | throws ParseException [static] |
parse a String and convert it into a java.lang.Object
str | the string to parse |
ParseException | a parse exception is thrown if the string to parse does not follow the rigth format (see the description of this class) |
References org.exolab.castor.types.TimeDuration.parseTimeDuration().
static TimeDuration org.exolab.castor.types.TimeDuration.parseTimeDuration | ( | String | str | ) | throws ParseException [static] |
Parse the given string and return a time duration which represents this string
String | str the string to parse |
ParseException | thrown when the string is not valid |
References org.exolab.castor.types.TimeDuration.setDay(), org.exolab.castor.types.TimeDuration.setHour(), org.exolab.castor.types.TimeDuration.setMilli(), org.exolab.castor.types.TimeDuration.setMinute(), org.exolab.castor.types.TimeDuration.setMonth(), org.exolab.castor.types.TimeDuration.setNegative(), org.exolab.castor.types.TimeDuration.setSeconds(), org.exolab.castor.types.TimeDuration.setYear(), and org.exolab.castor.types.TimeDuration.TimeDuration().
Referenced by org.exolab.castor.types.TimeDuration.parse().
void org.exolab.castor.types.TimeDuration.setDay | ( | short | day | ) |
void org.exolab.castor.types.TimeDuration.setHour | ( | short | hour | ) |
void org.exolab.castor.types.TimeDuration.setMilli | ( | short | milli | ) |
void org.exolab.castor.types.TimeDuration.setMinute | ( | short | minute | ) |
void org.exolab.castor.types.TimeDuration.setMonth | ( | short | month | ) |
void org.exolab.castor.types.TimeDuration.setNegative | ( | ) |
void org.exolab.castor.types.TimeDuration.setSeconds | ( | short | second | ) |
void org.exolab.castor.types.TimeDuration.setValue | ( | short | year, | |
short | month, | |||
short | day, | |||
short | hour, | |||
short | minute, | |||
short | second, | |||
short | millisecond | |||
) |
Fill in the fields of the TimeDuration with the given values
year | the year value | |
month | the month value | |
day | the day value | |
hour | the hour value | |
minute | the minute value | |
second | the second value |
References org.exolab.castor.types.TimeDuration.setDay(), org.exolab.castor.types.TimeDuration.setHour(), org.exolab.castor.types.TimeDuration.setMilli(), org.exolab.castor.types.TimeDuration.setMinute(), org.exolab.castor.types.TimeDuration.setMonth(), org.exolab.castor.types.TimeDuration.setSeconds(), and org.exolab.castor.types.TimeDuration.setYear().
Referenced by org.exolab.castor.types.TimeDuration.TimeDuration().
void org.exolab.castor.types.TimeDuration.setYear | ( | short | year | ) |
long org.exolab.castor.types.TimeDuration.toLong | ( | ) |
Convert a timeDuration into a long This long represents the duration in milliseconds
References org.exolab.castor.types.TimeDuration.isNegative().
Referenced by org.exolab.castor.types.TimeDuration.isGreater().
String org.exolab.castor.types.TimeDuration.toString | ( | ) |
Convert a timeDuration into a String conforming to ISO8601 and XML Schema specs
Referenced by org.exolab.castor.types.TimeDurationDescriptor.TimeDurationFieldHandler.getValue().