java.lang.Object | ||
↳ | org.joda.time.base.AbstractInterval | |
↳ | org.joda.time.base.BaseInterval |
Known Direct Subclasses |
BaseInterval is an abstract implementation of ReadableInterval that stores
data in two long
millisecond fields.
This class should generally not be used directly by API users.
The ReadableInterval
interface should be used when different
kinds of interval objects are to be referenced.
BaseInterval subclasses may be mutable and not thread-safe.
Protected Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs an interval from a start and end instant.
| |||||||||||
Constructs an interval from a start and end instant.
| |||||||||||
Constructs an interval from a start instant and a duration.
| |||||||||||
Constructs an interval from a millisecond duration and an end instant.
| |||||||||||
Constructs an interval from a start instant and a time period.
| |||||||||||
Constructs an interval from a time period and an end instant.
| |||||||||||
Constructs a time interval converting or copying from another object
that describes an interval.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Gets the chronology of this interval.
| |||||||||||
Gets the end of this time interval which is exclusive.
| |||||||||||
Gets the start of this time interval which is inclusive.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Sets this interval from two millisecond instants and a chronology.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.joda.time.base.AbstractInterval
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
org.joda.time.ReadableInterval
|
Constructs an interval from a start and end instant.
startInstant | start of this interval, as milliseconds from 1970-01-01T00:00:00Z. |
---|---|
endInstant | end of this interval, as milliseconds from 1970-01-01T00:00:00Z. |
chrono | the chronology to use, null is ISO default |
IllegalArgumentException | if the end is before the start |
---|
Constructs an interval from a start and end instant.
start | start of this interval, null means now |
---|---|
end | end of this interval, null means now |
IllegalArgumentException | if the end is before the start |
---|
Constructs an interval from a start instant and a duration.
start | start of this interval, null means now |
---|---|
duration | the duration of this interval, null means zero length |
IllegalArgumentException | if the end is before the start |
---|---|
ArithmeticException | if the end instant exceeds the capacity of a long |
Constructs an interval from a millisecond duration and an end instant.
duration | the duration of this interval, null means zero length |
---|---|
end | end of this interval, null means now |
IllegalArgumentException | if the end is before the start |
---|---|
ArithmeticException | if the start instant exceeds the capacity of a long |
Constructs an interval from a start instant and a time period.
When forming the interval, the chronology from the instant is used if present, otherwise the chronology of the period is used.
start | start of this interval, null means now |
---|---|
period | the period of this interval, null means zero length |
IllegalArgumentException | if the end is before the start |
---|---|
ArithmeticException | if the end instant exceeds the capacity of a long |
Constructs an interval from a time period and an end instant.
When forming the interval, the chronology from the instant is used if present, otherwise the chronology of the period is used.
period | the period of this interval, null means zero length |
---|---|
end | end of this interval, null means now |
IllegalArgumentException | if the end is before the start |
---|---|
ArithmeticException | if the start instant exceeds the capacity of a long |
Constructs a time interval converting or copying from another object that describes an interval.
interval | the time interval to copy |
---|---|
chrono | the chronology to use, null means let converter decide |
IllegalArgumentException | if the interval is invalid |
---|
Gets the end of this time interval which is exclusive.
Gets the start of this time interval which is inclusive.
Sets this interval from two millisecond instants and a chronology.
startInstant | the start of the time interval |
---|---|
endInstant | the start of the time interval |
chrono | the chronology, not null |
IllegalArgumentException | if the end is before the start |
---|