1
0
Fork 0
mirror of https://github.com/graphhopper/jsprit.git synced 2020-01-24 07:45:05 +01:00

add helper to compare time windows

This commit is contained in:
oblonski 2019-07-19 10:30:59 +02:00
parent d8bb1ca95a
commit af69361cd4
No known key found for this signature in database
GPG key ID: 179DE487285680D1

View file

@ -75,6 +75,10 @@ public class TimeWindow {
return end;
}
public boolean larger(TimeWindow timeWindow) {
return (this.getEnd() - this.getStart()) > (timeWindow.getEnd() - timeWindow.getStart());
}
@Override
public String toString() {
return "[start=" + start + "][end=" + end + "]";