public abstract class FixedCalendarInterval<T extends FixedCalendarInterval<T>> extends ChronoEntity<T> implements Comparable<T>, ChronoInterval<PlainDate>, Iterable<PlainDate>, Serializable
Represents a fixed calendar interval.
| Modifier and Type | Method and Description |
|---|---|
boolean |
abuts(ChronoInterval<PlainDate> other)
Queries if this interval abuts the other one such that there is neither any overlap nor any gap between.
|
boolean |
contains(ChronoInterval<PlainDate> other)
Does this interval contain the other one?
|
boolean |
isBefore(ChronoInterval<PlainDate> other)
Is this interval before the other one?
|
boolean |
isEmpty()
A calendar interval is never empty.
|
boolean |
isFinite()
A calendar interval is always finite.
|
boolean |
isSimultaneous(T other)
Queries if this object and given object have the same position
on the time axis.
|
Stream<PlainDate> |
streamDaily()
Obtains a stream iterating over every calendar date of this interval.
|
DateInterval |
toFlexInterval()
Converts this fixed interval to a date interval with flexible boundaries which can participate in
any kind of interval boundary manipulations.
|
<V> ValueInterval<PlainDate,T,V> |
withValue(V value)
Creates a combination of this interval with an associated value.
|
contains, get, get, getInt, getMaximum, getMinimum, getRegisteredElements, getTimezone, hasTimezone, isValid, isValid, isValid, matches, with, with, with, withequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcompareTocontains, getEnd, getStart, intersects, isAfter, isAfter, isBeforeforEach, iterator, spliteratorpublic final boolean isFinite()
A calendar interval is always finite.
isFinite in interface ChronoInterval<PlainDate>truepublic final boolean isEmpty()
A calendar interval is never empty.
isEmpty in interface ChronoInterval<PlainDate>falsepublic boolean contains(ChronoInterval<PlainDate> other)
ChronoIntervalDoes 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.
contains in interface ChronoInterval<PlainDate>other - another interval whose relation to this interval is to be investigatedtrue if this interval contains the other one else falseChronoInterval.intersects(ChronoInterval)public boolean isBefore(ChronoInterval<PlainDate> other)
ChronoIntervalIs this interval before the other one?
isBefore in interface ChronoInterval<PlainDate>other - another interval whose relation to this interval is to be investigatedtrue if this interval is before the other one else falsepublic boolean abuts(ChronoInterval<PlainDate> other)
ChronoIntervalQueries if this interval abuts the other one such that there is neither any overlap nor any gap between.
Note: Empty intervals never abut.
abuts in interface ChronoInterval<PlainDate>other - another interval which might abut this intervaltrue if there is no intersection and no gap between else falsepublic boolean isSimultaneous(T other)
Queries if this object and given object have the same position on the time axis.
other - object this instance is compared totrue if this instance is temporally equal to other else falsepublic DateInterval toFlexInterval()
Converts this fixed interval to a date interval with flexible boundaries which can participate in any kind of interval boundary manipulations.
public Stream<PlainDate> streamDaily()
Obtains a stream iterating over every calendar date of this interval.
public <V> ValueInterval<PlainDate,T,V> withValue(V value)
Creates a combination of this interval with an associated value.
V - generic value typevalue - associated value, not nullCopyright © 2014–2021. All rights reserved.