Merge pull request #364 from MilosKozak/overlappin-intervals-fix

Overlappinginterfals - find first element
This commit is contained in:
Milos Kozak 2017-08-16 08:11:04 +02:00 committed by GitHub
commit e1d2c557af

View file

@ -31,7 +31,7 @@ public class OverlappingIntervals<T extends Interval> extends Intervals<T> {
@Nullable
public synchronized T getValueByInterval(long time) {
for (int index = rawData.size()-1; index > 0; index--) { //begin with newest
for (int index = rawData.size()-1; index >= 0; index--) { //begin with newest
T cur = rawData.valueAt(index);
if (cur.match(time)){
return cur;