public class TimePeriod extends Object implements Serializable
Constructor and Description |
---|
TimePeriod()
Ctor.
|
TimePeriod(Integer years,
Integer months,
Integer weeks,
Integer days,
Integer hours,
Integer minutes,
Integer seconds,
Integer milliseconds,
Integer microseconds)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
TimePeriod |
days(Integer days)
Ctor for chain.
|
boolean |
equals(Object o) |
Integer |
getDays()
Returns days or null if not provided.
|
Integer |
getHours()
Returns hours or null if not provided.
|
Integer |
getMicroseconds()
Returns microseconds or null if not provided.
|
Integer |
getMilliseconds()
Returns milliseconds or null if not provided.
|
Integer |
getMinutes()
Returns minutes or null if not provided.
|
Integer |
getMonths()
Returns months or null if not provided.
|
Integer |
getSeconds()
Returns seconds or null if not provided.
|
Integer |
getWeeks()
Returns weeks or null if not provided.
|
Integer |
getYears()
Returns years or null if not provided.
|
int |
hashCode() |
TimePeriod |
hours(Integer hours)
Ctor for chain.
|
Integer |
largestAbsoluteValue()
Returns the largest absolute value.
|
TimePeriod |
micros(Integer microseconds)
Ctor for chain.
|
TimePeriod |
millis(Integer milliseconds)
Ctor for chain.
|
TimePeriod |
min(Integer minutes)
Ctor for chain.
|
TimePeriod |
months(Integer months)
Ctor for chain.
|
TimePeriod |
sec(Integer seconds)
Ctor for chain.
|
void |
setDays(Integer days)
Sets days or null if not provided.
|
void |
setHours(Integer hours)
Sets hours or null if not provided.
|
void |
setMicroseconds(Integer microseconds)
Sets microseconds or null if not provided.
|
void |
setMilliseconds(Integer milliseconds)
Sets milliseconds or null if not provided.
|
void |
setMinutes(Integer minutes)
Sets minutes or null if not provided.
|
void |
setMonths(Integer months)
Sets months or null if not provided.
|
void |
setSeconds(Integer seconds)
Sets seconds or null if not provided.
|
void |
setWeeks(Integer weeks)
Sets weeks or null if not provided.
|
void |
setYears(Integer years)
Sets years or null if not provided.
|
String |
toStringISO8601()
Returns ISO8601 string.
|
TimePeriod |
weeks(Integer weeks)
Ctor for chain.
|
TimePeriod |
years(Integer years)
Ctor for chain.
|
public TimePeriod(Integer years, Integer months, Integer weeks, Integer days, Integer hours, Integer minutes, Integer seconds, Integer milliseconds, Integer microseconds)
years
- yearsmonths
- monthweeks
- weeksdays
- dayshours
- hoursminutes
- minutesseconds
- secondsmilliseconds
- millisecondsmicroseconds
- microsecondspublic TimePeriod()
public Integer getYears()
public Integer getMonths()
public Integer getWeeks()
public Integer getDays()
public Integer getHours()
public Integer getMinutes()
public Integer getSeconds()
public Integer getMilliseconds()
public Integer getMicroseconds()
public void setYears(Integer years)
years
- to setpublic void setMonths(Integer months)
months
- to setpublic void setWeeks(Integer weeks)
weeks
- to setpublic void setDays(Integer days)
days
- to setpublic void setHours(Integer hours)
hours
- to setpublic void setMinutes(Integer minutes)
minutes
- to setpublic void setSeconds(Integer seconds)
seconds
- to setpublic void setMilliseconds(Integer milliseconds)
milliseconds
- to setpublic void setMicroseconds(Integer microseconds)
microseconds
- to setpublic TimePeriod years(Integer years)
years
- yearspublic TimePeriod months(Integer months)
months
- monthspublic TimePeriod weeks(Integer weeks)
weeks
- weekspublic TimePeriod days(Integer days)
days
- dayspublic TimePeriod hours(Integer hours)
hours
- hourspublic TimePeriod min(Integer minutes)
minutes
- minutespublic TimePeriod sec(Integer seconds)
seconds
- secondspublic TimePeriod millis(Integer milliseconds)
milliseconds
- millispublic TimePeriod micros(Integer microseconds)
microseconds
- microspublic String toStringISO8601()
public Integer largestAbsoluteValue()