|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
com.std.util.range.DateRange
public class DateRange
represents a constant range of dates
Field Summary | |
---|---|
static long |
serialVersionUID
|
Constructor Summary | |
---|---|
DateRange()
creates a new DateRange where the start and end dates are set to the moment of creation |
|
DateRange(java.util.Date date)
start and end dates are set to the given date |
|
DateRange(java.util.Date startDate,
java.util.Date endDate)
start and end dates are set to the given dates |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
|
double |
getDurationInDays()
|
long |
getDurationInMS()
|
java.util.Date |
getEndDate()
|
java.util.Date |
getStartDate()
|
int |
hashCode()
|
protected void |
setEndDate(java.util.Date endDate)
changes the end date of the range |
protected void |
setStartDate(java.util.Date startDate)
changes the start date of the range |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final long serialVersionUID
Constructor Detail |
---|
public DateRange()
public DateRange(java.util.Date date)
date
- the start and end dates of the rangepublic DateRange(java.util.Date startDate,
java.util.Date endDate)
startDate
- the start date of the rangeendDate
- the end date of the rangeMethod Detail |
---|
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public double getDurationInDays()
public long getDurationInMS()
public java.util.Date getEndDate()
public java.util.Date getStartDate()
public int hashCode()
hashCode
in class java.lang.Object
protected void setEndDate(java.util.Date endDate)
endDate
- the end date of the rangeprotected void setStartDate(java.util.Date startDate)
startDate
- the start date of the rangepublic java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |