Skip to content
Snippets Groups Projects
Commit 8b6d8eb5 authored by Tor-Einar Skog's avatar Tor-Einar Skog
Browse files

Added access to last date with values

parent c2b9a730
No related branches found
No related tags found
No related merge requests found
...@@ -253,6 +253,20 @@ public class DateMap { ...@@ -253,6 +253,20 @@ public class DateMap {
} }
} }
public Date getLastDateWithValues()
{
ArrayList<Date> dates = new ArrayList(this.matrix.keySet());
if(dates.isEmpty())
{
return null;
}
else
{
Collections.sort(dates);
return dates.get(dates.size()-1);
}
}
public List<Date> getSortedDateKeys() public List<Date> getSortedDateKeys()
{ {
ArrayList<Date> keys = new ArrayList(this.matrix.keySet()); ArrayList<Date> keys = new ArrayList(this.matrix.keySet());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment