Merge pull request #364 from MilosKozak/overlappin-intervals-fix
Overlappinginterfals - find first element
This commit is contained in:
commit
e1d2c557af
1 changed files with 1 additions and 1 deletions
|
@ -31,7 +31,7 @@ public class OverlappingIntervals<T extends Interval> extends Intervals<T> {
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
public synchronized T getValueByInterval(long time) {
|
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);
|
T cur = rawData.valueAt(index);
|
||||||
if (cur.match(time)){
|
if (cur.match(time)){
|
||||||
return cur;
|
return cur;
|
||||||
|
|
Loading…
Reference in a new issue