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");
}

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" ) ; }
finds the first resolution of name in the given timeseriescollections . the cache is used and updated to skip the linear search phase .
