code: private static Map.Entry<DateTime, TimeSeriesValue> findName(List<TimeSeriesCollection> c, GroupName name) {
          ListIterator<TimeSeriesCollection> iter = c.listIterator();
          while (iter.hasNext()) {
              final int idx = iter.nextIndex();
              final TimeSeriesCollection tsdata = iter.next();
  
              final Optional<TimeSeriesValue> found = tsdata.get(name);
              if (found.isPresent())
                  return SimpleMapEntry.create(tsdata.getTimestamp(), found.get());
          }
  
          throw new IllegalStateException("name not present in list of time series collections");
      }
docs: Finds the first resolution of name in the given TimeSeriesCollections.
  The cache is used and updated to skip the linear search phase.
  
  @param c TimeSeriesCollection instances in which to search.
  @param name The searched for name. Note that the name must be present in
  the collection.
  @param cache Cache used and updated during lookups, to skip the linear
  search.
  @return The first TimeSeriesValue in the list of TSCollections with the
  given name.
  @throws IllegalStateException if the name was not found.