Overlappinginterfals - find first element

This commit is contained in:
AdrianLxM 2017-08-15 22:38:48 +02:00 committed by GitHub
parent 4c490c32f7
commit 2e382267d4

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;