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 .