|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Writable interface for an interval.
Method Summary | |
void |
setChronology(Chronology chrono)
Sets the chronology of this time interval. |
void |
setDurationAfterStart(ReadableDuration duration)
Sets the duration of this time interval, preserving the start instant. |
void |
setDurationBeforeEnd(ReadableDuration duration)
Sets the duration of this time interval, preserving the end instant. |
void |
setEnd(ReadableInstant instant)
Sets the end of this time interval as an Instant. |
void |
setEndMillis(long millisInstant)
Sets the end of this time interval. |
void |
setInterval(long startInstant,
long endInstant)
Sets this interval from two millisecond instants. |
void |
setInterval(ReadableInstant startInstant,
ReadableInstant endInstant)
Sets this interval from two instants. |
void |
setInterval(ReadableInterval interval)
Sets this interval to be the same as another. |
void |
setPeriodAfterStart(ReadablePeriod period)
Sets the period of this time interval, preserving the start instant. |
void |
setPeriodBeforeEnd(ReadablePeriod period)
Sets the period of this time interval, preserving the end instant. |
void |
setStart(ReadableInstant instant)
Sets the start of this time interval as an Instant. |
void |
setStartMillis(long millisInstant)
Sets the start of this time interval. |
Methods inherited from interface org.joda.time.ReadableInterval |
contains, contains, equals, getChronology, getEnd, getEndMillis, getStart, getStartMillis, hashCode, isAfter, isAfter, isBefore, isBefore, overlaps, toDuration, toDurationMillis, toInterval, toMutableInterval, toPeriod, toPeriod, toString |
Method Detail |
public void setInterval(long startInstant, long endInstant)
startInstant
- the start of the time intervalendInstant
- the start of the time interval
IllegalArgumentException
- if the end is before the startpublic void setInterval(ReadableInterval interval)
interval
- the interval to copy
IllegalArgumentException
- if the end is before the startpublic void setInterval(ReadableInstant startInstant, ReadableInstant endInstant)
startInstant
- the start of the time intervalendInstant
- the start of the time interval
IllegalArgumentException
- if the end is before the startpublic void setChronology(Chronology chrono)
chrono
- the chronology to use, null means ISO defaultpublic void setStartMillis(long millisInstant)
millisInstant
- the start of the time interval,
millisecond instant from 1970-01-01T00:00:00Z
IllegalArgumentException
- if the end is before the startpublic void setStart(ReadableInstant instant)
instant
- the start of the time interval
IllegalArgumentException
- if the end is before the startpublic void setEndMillis(long millisInstant)
millisInstant
- the end of the time interval,
millisecond instant from 1970-01-01T00:00:00Z
IllegalArgumentException
- if the end is before the startpublic void setEnd(ReadableInstant instant)
instant
- the end of the time interval
IllegalArgumentException
- if the end is before the startpublic void setDurationAfterStart(ReadableDuration duration)
duration
- new duration for interval
IllegalArgumentException
- if the end is before the start
ArithmeticException
- if the end instant exceeds the capacity of a longpublic void setDurationBeforeEnd(ReadableDuration duration)
duration
- new duration for interval
IllegalArgumentException
- if the end is before the start
ArithmeticException
- if the start instant exceeds the capacity of a longpublic void setPeriodAfterStart(ReadablePeriod period)
period
- new period for interval, null means zero length
IllegalArgumentException
- if the end is before the start
ArithmeticException
- if the end instant exceeds the capacity of a longpublic void setPeriodBeforeEnd(ReadablePeriod period)
period
- new period for interval, null means zero length
IllegalArgumentException
- if the end is before the start
ArithmeticException
- if the start instant exceeds the capacity of a long
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |