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