net.degreedays.time
Class MaybeEmptyDayRanges
java.lang.Object
net.degreedays.time.MaybeEmptyDayRanges
- Direct Known Subclasses:
- DayRanges
public abstract class MaybeEmptyDayRanges
- extends java.lang.Object
This abstract class is not designed to be extended by third-party code, which is why it does not have an accessible constructor.
All concrete subclasses of this abstract class are immutable. You can safely reuse them and call them from multiple threads at once.
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, toString, wait, wait, wait |
fullRangeOrNull
public final DayRange fullRangeOrNull()
isEmpty
public final boolean isEmpty()
notEmpty
public final DayRanges notEmpty()
throws java.lang.IllegalStateException
- Throws:
java.lang.IllegalStateException
- if isEmpty()
returns true.
count
public final int count()
get
public final DayRange get(int index)
- Throws:
java.lang.IndexOutOfBoundsException
- if index
is less
than zero or greater than or equal to count()
.
indexOf
public final int indexOf(DayRange dayRange)
subRanges
public final MaybeEmptyDayRanges subRanges(int fromIndexInclusive,
int toIndexExclusive)
- Throws:
java.lang.IndexOutOfBoundsException
- for an illegal index value
(fromIndexInclusive < 0 || toIndexExclusive > count() ||
fromIndexInclusive > toIndexExclusive)
equals
public final boolean equals(java.lang.Object o)
- Overrides:
equals
in class java.lang.Object
hashCode
public final int hashCode()
- Overrides:
hashCode
in class java.lang.Object
getEmpty
public static MaybeEmptyDayRanges getEmpty()
www.degreedays.net/api/