(Iterable<?> keys)
| 4007 | } |
| 4008 | |
| 4009 | ImmutableMap<K, V> getAllPresent(Iterable<?> keys) { |
| 4010 | int hits = 0; |
| 4011 | int misses = 0; |
| 4012 | |
| 4013 | ImmutableMap.Builder<K, V> result = ImmutableMap.builder(); |
| 4014 | for (Object key : keys) { |
| 4015 | V value = get(key); |
| 4016 | if (value == null) { |
| 4017 | misses++; |
| 4018 | } else { |
| 4019 | class="cm">// TODO(fry): store entry key instead of query key |
| 4020 | @SuppressWarnings(class="st">"unchecked") |
| 4021 | K castKey = (K) key; |
| 4022 | result.put(castKey, value); |
| 4023 | hits++; |
| 4024 | } |
| 4025 | } |
| 4026 | globalStatsCounter.recordHits(hits); |
| 4027 | globalStatsCounter.recordMisses(misses); |
| 4028 | return result.buildKeepingLast(); |
| 4029 | } |
| 4030 | |
| 4031 | ImmutableMap<K, V> getAll(Iterable<? extends K> keys) throws ExecutionException { |
| 4032 | int hits = 0; |
nothing calls this directly
no test coverage detected