|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ebasetech.ufs.utility.TimeInterval
Represents a time interval (that is, a number of months, or days, etc). It separately represents a number of months, etc., in an interval
Field Summary | |
private int |
_days
The number of days in this interval |
private int |
_hours
The number of hours in this interval |
private int |
_minutes
The number of minutes in this interval |
private int |
_months
The number of months in this interval |
private int |
_seconds
The number of seconds in this interval |
private int |
_weeks
The number of weeks in this interval |
private static java.lang.String |
COMMA
|
static TimeInterval |
NULL_SENTINEL
null sentinel for checking for a zero time interval |
Constructor Summary | |
TimeInterval()
Default constructor which just creates an interval with all data set to zero |
|
TimeInterval(int days)
A simple constructor, that seems useful in the real world, for just setting the number of days in an interval |
|
TimeInterval(int months,
int weeks,
int days,
int hours,
int minutes,
int seconds)
Constructor that sets all internal data in one swell foop. |
|
TimeInterval(java.lang.String interval)
Constructor that takes a string such as that generated by the toString method |
|
TimeInterval(TimeInterval clonee)
Construct a new timeinterval based on the supplied one |
Method Summary | |
boolean |
equals(java.lang.Object other)
|
int |
getDays()
|
int |
getHours()
|
int |
getMinutes()
|
int |
getMonths()
|
int |
getSeconds()
|
int |
getWeeks()
|
java.util.Date |
offsetFrom(java.util.Date date,
boolean absolute,
com.ebasetech.ufs.kernel.calendar.OrganisationCalendar organisationCalendar)
Given a date, answer the date that is the former offset by the amount of the receiver. |
void |
setDays(int days)
|
void |
setHours(int hours)
|
void |
setMinutes(int minutes)
|
void |
setMonths(int months)
|
void |
setSeconds(int seconds)
|
void |
setWeeks(int weeks)
|
java.lang.String |
toString()
toString method that generates a stringified form of the interval that may also be used for construction of interval objects |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final TimeInterval NULL_SENTINEL
private int _months
private int _weeks
private int _days
private int _hours
private int _minutes
private int _seconds
private static final java.lang.String COMMA
Constructor Detail |
public TimeInterval()
public TimeInterval(java.lang.String interval)
public TimeInterval(int months, int weeks, int days, int hours, int minutes, int seconds)
public TimeInterval(TimeInterval clonee)
public TimeInterval(int days)
Method Detail |
public java.lang.String toString()
public boolean equals(java.lang.Object other)
public int getMonths()
public int getWeeks()
public int getDays()
public int getHours()
public int getMinutes()
public int getSeconds()
public void setMonths(int months)
public void setWeeks(int weeks)
public void setDays(int days)
public void setHours(int hours)
public void setMinutes(int minutes)
public void setSeconds(int seconds)
public java.util.Date offsetFrom(java.util.Date date, boolean absolute, com.ebasetech.ufs.kernel.calendar.OrganisationCalendar organisationCalendar) throws PersistenceException
PersistenceException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |