Interface Maps.EntryTransformer<K,V1,V2>

Type Parameters:
K - the key type of the input and output entries
V1 - the value type of the input entry
V2 - the value type of the output entry
Enclosing class:

public static interface Maps.EntryTransformer<K,V1,V2>

A transformation of the value of a key-value pair, using both key and value as inputs. To apply the transformation to a map, use Maps.transformEntries(Map, EntryTransformer).


Method Summary
 V2 transformEntry(K key, V1 value)
          Determines an output value based on a key-value pair.

Method Detail


V2 transformEntry(@Nullable
                  K key,
                  V1 value)
Determines an output value based on a key-value pair. This method is generally expected, but not absolutely required, to have the following properties:

NullPointerException - if the key or value is null and this transformer does not accept null arguments

Copyright © 2010-2012. All Rights Reserved.