|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectDefaultDuration
DefaultPeriodDuration
public class DefaultPeriodDuration
Uses the format specified by ISO 8601 for exchanging information about the duration of a period.
Constructor Summary | |
---|---|
DefaultPeriodDuration(InternationalString years,
InternationalString months,
InternationalString week,
InternationalString days,
InternationalString hours,
InternationalString minutes,
InternationalString seconds)
Creates a new instances of PeriodDuration. |
|
DefaultPeriodDuration(long durationInMilliSeconds)
Creates a new instance of PeriodDuration from a long value passed in parameter. |
Method Summary | |
---|---|
boolean |
equals(Object object)
|
InternationalString |
getDays()
A positive integer, followed by the character "D", which indicated the number of days in the period. |
InternationalString |
getDesignator()
A mandatory element which designates that the returned string represents the duration of a period. |
InternationalString |
getHours()
A positive integer, followed by the character "H", which indicated the number of hours in the period. |
InternationalString |
getMinutes()
A positive integer, followed by the character "M", which indicated the number of minutes in the period. |
InternationalString |
getMonths()
A positive integer, followed by the character "M", which indicated the number of months in the period. |
InternationalString |
getSeconds()
A positive integer, followed by the character "S", which indicated the number of seconds in the period. |
InternationalString |
getTimeIndicator()
Included whenever the sequence includes values for units less than a day. |
long |
getTimeInMillis()
Returns a duration in long. note there is no starting instant to accurate the returned value. |
InternationalString |
getWeek()
|
InternationalString |
getYears()
A positive integer, followed by the character "Y", which indicated the number of years in the period. |
int |
hashCode()
|
void |
setDays(InternationalString days)
|
void |
setHours(InternationalString hours)
|
void |
setMinutes(InternationalString minutes)
|
void |
setMonths(InternationalString months)
|
void |
setSeconds(InternationalString seconds)
|
void |
setWeek(InternationalString week)
|
void |
setYears(InternationalString years)
|
String |
toString()
|
Methods inherited from class Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DefaultPeriodDuration(InternationalString years, InternationalString months, InternationalString week, InternationalString days, InternationalString hours, InternationalString minutes, InternationalString seconds)
years
- months
- weeks
- days
- hours
- minutes
- seconds
- public DefaultPeriodDuration(long durationInMilliSeconds)
durationInMilliSeconds
- Method Detail |
---|
public InternationalString getDesignator()
getDesignator
in interface PeriodDuration
public InternationalString getYears()
getYears
in interface PeriodDuration
public InternationalString getMonths()
getMonths
in interface PeriodDuration
public InternationalString getDays()
getDays
in interface PeriodDuration
public InternationalString getTimeIndicator()
getTimeIndicator
in interface PeriodDuration
public InternationalString getHours()
getHours
in interface PeriodDuration
public InternationalString getMinutes()
getMinutes
in interface PeriodDuration
public InternationalString getSeconds()
getSeconds
in interface PeriodDuration
public void setYears(InternationalString years)
public void setMonths(InternationalString months)
public void setDays(InternationalString days)
public void setHours(InternationalString hours)
public void setMinutes(InternationalString minutes)
public void setSeconds(InternationalString seconds)
public InternationalString getWeek()
public void setWeek(InternationalString week)
public long getTimeInMillis()
getTimeInMillis
in class DefaultDuration
public boolean equals(Object object)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |