public static <T>EfficiencyRun determineEfficiency(Map<T,T> cache,List<T> workingSet){
  int hits=0;
  for (  T key : workingSet) {
    if (cache.get(key) == null) {
      cache.put(key,key);
    }
 else {
      hits++;
    }
  }
  return EfficiencyRun.of(hits,workingSet.size());
}

public static < T > EfficiencyRun determineEfficiency ( Map < T , T > cache , List < T > workingSet ) { int hits = 0 ; for ( T key : workingSet ) { if ( cache . get ( key ) == null ) { cache . put ( key , key ) ; } else { hits ++ ; } } return EfficiencyRun . of ( hits , workingSet . size ( ) ) ; }
determines the hit / miss rate of a cache .
