X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=altoslib%2FAltosTimeSeries.java;h=9f3b4d807ef26bb36ae9a358515ac41c17f3bad5;hb=refs%2Fheads%2Ffake-flight;hp=b3c432fcf565e1b481d63e0025024334a8d90061;hpb=46ff12a88136d3c274610255a918870aff9328cd;p=fw%2Faltos diff --git a/altoslib/AltosTimeSeries.java b/altoslib/AltosTimeSeries.java index b3c432fc..9f3b4d80 100644 --- a/altoslib/AltosTimeSeries.java +++ b/altoslib/AltosTimeSeries.java @@ -151,11 +151,15 @@ public class AltosTimeSeries implements Iterable, Comparable 0) + return values.get(0); + return null; } public AltosTimeValue last() { - return values.get(values.size() - 1); + if (values.size() > 0) + return values.get(values.size() - 1); + return null; } public double average() {