|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcz.muni.fi.pclis.commons.date.Period
public class Period
Period
is immutable class that represents period between
two dates.
User: Ľuboš Pecho
Date: 6.7.2009
Time: 18:15:42
Field Summary | |
---|---|
private Date |
endTime
End time of the period |
private Date |
startTime
Start time of the period |
Constructor Summary | |
---|---|
|
Period()
Constructs new period, only for Hibernate. |
private |
Period(Date startTime,
Date endTime)
Constructs new period, only for Hibernate. |
Method Summary | |
---|---|
boolean |
contains(Date date)
Returns true if the period contains given date |
boolean |
equals(Object o)
|
Date |
getEndTime()
|
static Period |
getPeriod(Date startTime,
Date endTime)
Factory method for creating periods |
Date |
getStartTime()
|
int |
hashCode()
|
void |
setEndTime(Date endTime)
Sets end time |
void |
setStartTime(Date startTime)
Sets start time |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private Date startTime
private Date endTime
Constructor Detail |
---|
public Period()
private Period(Date startTime, Date endTime)
startTime
- endTime
- Method Detail |
---|
public static Period getPeriod(Date startTime, Date endTime)
startTime
- endTime
-
public Date getStartTime()
public Date getEndTime()
public void setEndTime(Date endTime)
endTime
- public void setStartTime(Date startTime)
startTime
- public boolean contains(Date date)
date
-
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |