(Set<K> set, final Function<? super K, V> function)
| 909 | |
| 910 | |
| 911 | static <K, V> Iterator<Entry<K, V>> asMapEntryIterator(Set<K> set, final Function<? super K, V> function) { |
| 912 | return new TransformedIterator<K, Entry<K, V>>(set.iterator()) { |
| 913 | @Override |
| 914 | Entry<K, V> transform(final K key) { |
| 915 | return immutableEntry(key, function.apply(key)); |
| 916 | } |
| 917 | }; |
| 918 | } |
| 919 | |
| 920 | private static class SortedAsMapView<K, V> extends AsMapView<K, V> |
| 921 | implements SortedMap<K, V> { |