1. reduce
Map<String, List<Date>> perQuarterlyDate = getPerQuarterlyDate(start, end);
String first1 = perQuarterlyDate.keySet().stream().reduce((first, last) -> first).orElse(null);
String last1 = perQuarterlyDate.keySet().stream().reduce((first, last) -> last).orElse(null);
2. skip
LinkedHashMap<String, List<Date>> map = new LinkedHashMap<>();
String k = map.keySet().stream().skip(map.size() - 1).findAny().orElse(null);
String v = map.keySet().stream().findFirst().orElse(null);