public class ReservationInterval extends Object implements Comparable<ReservationInterval>
Constructor and Description |
---|
ReservationInterval(long startTime,
long endTime) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(ReservationInterval anotherInterval) |
boolean |
equals(Object obj) |
long |
getEndTime()
Get the end time of the reservation interval
|
long |
getStartTime()
Get the start time of the reservation interval
|
int |
hashCode() |
boolean |
isOverlap(long tick)
Returns whether the interval is active at the specified instant of time
|
String |
toString() |
public long getStartTime()
public long getEndTime()
public boolean isOverlap(long tick)
tick
- the instance of the time to checkpublic int compareTo(ReservationInterval anotherInterval)
compareTo
in interface Comparable<ReservationInterval>
Copyright © 2017 Apache Software Foundation. All Rights Reserved.