Package com.amalgamasimulation.trains
Class BookingSlot
java.lang.Object
com.amalgamasimulation.core.intervals.Interval
com.amalgamasimulation.core.scheduling.TimeInterval
com.amalgamasimulation.core.scheduling.Slot
com.amalgamasimulation.trains.BookingSlot
- All Implemented Interfaces:
IntervalLike,Comparable<IntervalLike>
Represents a time interval booked by a specific booker.
A BookingSlot is a specialization of Slot that includes
information about the entity (booker) that owns the booking. It provides
additional methods for intersection checks and for computing exclusions
relative to other intervals.
- Author:
- Andrey Korotin
-
Field Summary
Fields inherited from class com.amalgamasimulation.core.scheduling.Slot
minDuration, sequence -
Constructor Summary
ConstructorsConstructorDescriptionBookingSlot(Object booker, double beginTime, double endTime) Constructs a newBookingSlotfor the given booker and time interval. -
Method Summary
Methods inherited from class com.amalgamasimulation.core.scheduling.Slot
copy, dummy, minDuration, sequence, setMinDurationMethods inherited from class com.amalgamasimulation.core.scheduling.TimeInterval
beginTime, contains, duration, endTime, getExclusion, getIntersection, intersectsWithMethods inherited from class com.amalgamasimulation.core.intervals.Interval
asIntervalSet, contains, equalsWithinEpsilon, equalsWithinEpsilon, exclusion, hashCode, hasNonZeroIntersectionWith, intersection, isEmpty, isUniverse, leftSubset, max, min, of, of, rightSubset, shift, size, toCodeString, toString, unionMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.amalgamasimulation.core.intervals.IntervalLike
compareTo, complement, contains, isFinite, isZeroLength, length
-
Constructor Details
-
BookingSlot
Constructs a newBookingSlotfor the given booker and time interval.- Parameters:
booker- the object representing the entity that made the booking (must not benull)beginTime- the start time of the slotendTime- the end time of the slot- Throws:
NullPointerException- ifbookerisnull
-
-
Method Details