public class PeriodValueImpl extends java.lang.Object implements PeriodValue
DateValues.| Modifier | Constructor and Description |
|---|---|
protected |
PeriodValueImpl(DateValue start,
DateValue end) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(PeriodValue pv)
true iff this period completely contains the given period.
|
static PeriodValue |
create(DateValue start,
DateValue end)
returns a period with the given start and end dates.
|
static PeriodValue |
createFromDuration(DateValue start,
DateValue dur)
returns a period with the given start date and duration.
|
DateValue |
end()
the end of the period.
|
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
boolean |
intersects(PeriodValue pv)
true iff this period overlaps the given period.
|
DateValue |
start()
the start of the period.
|
java.lang.String |
toString() |
public static PeriodValue create(DateValue start, DateValue end)
start - non null.end - on or after start. May/must have a time if the start has a
time.public static PeriodValue createFromDuration(DateValue start, DateValue dur)
start - non null.dur - a positive duration represented as a DateValue.public DateValue start()
PeriodValuestart in interface PeriodValuepublic DateValue end()
PeriodValuePeriodValue.start(), and
(start() instanceof TimeValue) ==
(end() instanceof TimeValue).end in interface PeriodValuepublic boolean intersects(PeriodValue pv)
intersects in interface PeriodValuepv - not null.public boolean contains(PeriodValue pv)
contains in interface PeriodValuepv - not null.public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object