T - temporal type of time points within a given intervalpublic interface ChronoInterval<T>
Represents a temporal interval on a timeline.
Note: Time4J-intervals contain every timepoint between start and end boundary without exception (continuous intervals).
| Modifier and Type | Method and Description |
|---|---|
boolean |
abuts(ChronoInterval<T> other)
Queries if this interval abuts the other one such that there is neither any overlap nor any gap between.
|
boolean |
contains(ChronoInterval<T> other)
Does this interval contain the other one?
|
boolean |
contains(T temporal)
Queries if given time point belongs to this interval.
|
Boundary<T> |
getEnd()
Yields the upper bound of this interval.
|
Boundary<T> |
getStart()
Yields the lower bound of this interval.
|
default boolean |
intersects(ChronoInterval<T> other)
Queries if this interval intersects the other one such that there is at least one common time point.
|
default boolean |
isAfter(ChronoInterval<T> other)
Is this interval after the other one?
|
boolean |
isAfter(T temporal)
Is this interval after the given time point?
|
boolean |
isBefore(ChronoInterval<T> other)
Is this interval before the other one?
|
boolean |
isBefore(T temporal)
Is this interval before the given time point?
|
boolean |
isEmpty()
Determines if this interval is empty.
|
default boolean |
isFinite()
Determines if this interval has finite boundaries.
|
Boundary<T> getStart()
Yields the lower bound of this interval.
Boundary<T> getEnd()
Yields the upper bound of this interval.
default boolean isFinite()
Determines if this interval has finite boundaries.
true if start and end are finite else falseboolean isEmpty()
Determines if this interval is empty.
true if this interval does not contain any time point else falseboolean contains(T temporal)
Queries if given time point belongs to this interval.
temporal - time point to be queriedtrue if given time point belongs to this interval else falseboolean contains(ChronoInterval<T> other)
Does this interval contain the other one?
An interval cannot contain infinite intervals but can contain an empty interval if it contains the start anchor of the empty interval.
other - another interval whose relation to this interval is to be investigatedtrue if this interval contains the other one else falseintersects(ChronoInterval)boolean isAfter(T temporal)
Is this interval after the given time point?
temporal - reference time pointtrue if this interval is after given time point else falsedefault boolean isAfter(ChronoInterval<T> other)
Is this interval after the other one?
other - another interval whose relation to this interval is to be investigatedtrue if this interval is after the other one else falseboolean isBefore(T temporal)
Is this interval before the given time point?
temporal - reference time pointtrue if this interval is before given time point else falseboolean isBefore(ChronoInterval<T> other)
Is this interval before the other one?
other - another interval whose relation to this interval is to be investigatedtrue if this interval is before the other one else falseboolean abuts(ChronoInterval<T> other)
Queries if this interval abuts the other one such that there is neither any overlap nor any gap between.
Note: Empty intervals never abut.
other - another interval which might abut this intervaltrue if there is no intersection and no gap between else falsedefault boolean intersects(ChronoInterval<T> other)
Queries if this interval intersects the other one such that there is at least one common time point.
In contrast to contains(ChronoInterval), an interval can never intersect an empty interval.
other - another interval which might have an intersection with this intervaltrue if there is an non-empty intersection of this interval and the other one else falseisBefore(ChronoInterval),
isAfter(ChronoInterval)Copyright © 2014–2018. All rights reserved.