public interface TimeSlot extends Serializable, Comparable<TimeSlot>
| Modifier and Type | Field and Description |
|---|---|
static String |
EMPTY
Denotes the empty time slot.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(TimeSlot ts)
Compares this time slot with another one.
|
boolean |
endsAfter(TimeSlot ts)
Checks if this time slot ends after the given time slot.
|
boolean |
endsBefore(TimeSlot ts)
Checks if this time slot ends before the given time slot.
|
boolean |
exactlyMatches(TimeSlot ts)
Checks if this time slot exactly matches the given time slot.
|
LocalDateTime |
getFinish()
Returns the end of the time slot.
|
LocalDateTime |
getStart()
Returns the start of the time slot.
|
boolean |
includes(LocalDateTime dateTime)
Returns true iff NOT (dateTime < this.start() AND dateTime <
this.end()).
|
boolean |
includes(TimeSlot ts)
Returns true iff this.includes(ts.start()) && this.includes(ts.end()).
|
boolean |
isEmpty()
Returns true iff start >= end.
|
boolean |
overlaps(TimeSlot ts)
Returns true iff ts.includes(this.getStart()) OR
ts.includes(this.getFinish()) OR this.includes(ts).
|
boolean |
startsAfter(TimeSlot ts)
Checks if this time slot starts after the given time slot.
|
boolean |
startsBefore(TimeSlot ts)
Checks if this date range starts before the given date range.
|
boolean |
strictlyIncludes(TimeSlot ts)
Checks if this time slot strictly includes the given time slot.
|
static final String EMPTY
LocalDateTime getFinish()
LocalDateTime getStart()
boolean isEmpty()
boolean includes(LocalDateTime dateTime)
dateTime - a date-time to check.boolean includes(TimeSlot ts)
ts - the time slot to checkboolean overlaps(TimeSlot ts)
ts - the time slot to checkint compareTo(TimeSlot ts)
compareTo in interface Comparable<TimeSlot>ts - another time slotComparable.compareTo(java.lang.Object)boolean startsBefore(TimeSlot ts)
ts - the given date rangeboolean startsAfter(TimeSlot ts)
ts - the given time slotboolean endsBefore(TimeSlot ts)
ts - the given time slotboolean endsAfter(TimeSlot ts)
ts - the given time slot.boolean strictlyIncludes(TimeSlot ts)
ts - the given time slotboolean exactlyMatches(TimeSlot ts)
ts - the given time slot.Copyright © 2016 BFH. All rights reserved.