Class MapEntryTransformer<K,V,KW,VW>
java.lang.Object
com.aoapps.collections.transformers.MapEntryTransformer<K,V,KW,VW>
- All Implemented Interfaces:
Transformer<Map.Entry<K,V>, Map.Entry<KW, VW>>
public class MapEntryTransformer<K,V,KW,VW>
extends Object
implements Transformer<Map.Entry<K,V>,Map.Entry<KW,VW>>
Transforms map entries.
- Author:
- AO Industries, Inc.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected MapEntryTransformer<KW, VW, K, V> protected final Transformer<K, KW> protected final Transformer<V, VW> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedMapEntryTransformer(Transformer<K, KW> keyTransformer, Transformer<V, VW> valueTransformer) -
Method Summary
Modifier and TypeMethodDescriptionfromWrapped(Map.Entry<KW, VW> entry) invert()static <K,V, KW, VW>
Transformer<Map.Entry<K, V>, Map.Entry<KW, VW>> of(Transformer<K, KW> keyTransformer, Transformer<V, VW> valueTransformer) Gets a map entry transformer.Gets a transformer that wraps and unwraps only when elements are of the wrapper or wrapped types, respectively.
-
Field Details
-
keyTransformer
-
valueTransformer
-
inverted
-
-
Constructor Details
-
MapEntryTransformer
-
-
Method Details
-
of
public static <K,V, Transformer<Map.Entry<K,KW, VW> V>, ofMap.Entry<KW, VW>> (Transformer<K, KW> keyTransformer, Transformer<V, VW> valueTransformer) Gets a map entry transformer. -
toWrapped
- Specified by:
toWrappedin interfaceTransformer<K,V>
-
fromWrapped
- Specified by:
fromWrappedin interfaceTransformer<K,V>
-
unbounded
Description copied from interface:TransformerGets a transformer that wraps and unwraps only when elements are of the wrapper or wrapped types, respectively. This is useful for legacy APIs that useObjector unbounded generics, such as:- Specified by:
unboundedin interfaceTransformer<K,V>
-
invert
- Specified by:
invertin interfaceTransformer<K,V>
-
