(
Set<K> set, final Function<? super K, V> function)
| 879 | } |
| 880 | |
| 881 | static <K, V> Iterator<Entry<K, V>> asMapEntryIterator( |
| 882 | Set<K> set, final Function<? super K, V> function) { |
| 883 | return new TransformedIterator<K, Entry<K, V>>(set.iterator()) { |
| 884 | @Override |
| 885 | Entry<K, V> transform(final K key) { |
| 886 | return immutableEntry(key, function.apply(key)); |
| 887 | } |
| 888 | }; |
| 889 | } |
| 890 | |
| 891 | private static class SortedAsMapView<K, V> extends AsMapView<K, V> implements SortedMap<K, V> { |
| 892 |