Views an entry transformer as a function from entries to entries.
(final EntryTransformer<? super K, ? super V1, V2> transformer)
| 2006 | |
| 2007 | |
| 2008 | static <K, V1, V2> Function<Entry<K, V1>, Entry<K, V2>> asEntryToEntryFunction(final EntryTransformer<? super K, ? super V1, V2> transformer) { |
| 2009 | checkNotNull(transformer); |
| 2010 | return new Function<Entry<K, V1>, Entry<K, V2>>() { |
| 2011 | @Override |
| 2012 | public Entry<K, V2> apply(final Entry<K, V1> entry) { |
| 2013 | return transformEntry(transformer, entry); |
| 2014 | } |
| 2015 | }; |
| 2016 | } |
| 2017 | |
| 2018 | |
| 2019 | static class TransformedEntriesMap<K, V1, V2> extends IteratorBasedAbstractMap<K, V2> { |
no test coverage detected