Class EntryConverterByKey<K,L,V>

java.lang.Object
com.google.common.base.Converter<Map.Entry<K,V>,Map.Entry<L,V>>
org.aksw.commons.collections.maps.EntryConverterByKey<K,L,V>
Type Parameters:
K - The source key type of the entry
L - The target key type that is converted to
V - The value type of the entry
All Implemented Interfaces:
com.google.common.base.Function<Map.Entry<K,V>,Map.Entry<L,V>>, Function<Map.Entry<K,V>,Map.Entry<L,V>>

public class EntryConverterByKey<K,L,V> extends com.google.common.base.Converter<Map.Entry<K,V>,Map.Entry<L,V>>
An extension of Converter specifically for converting Map.Entry objects.
Author:
raven
  • Field Details

    • converter

      protected com.google.common.base.Converter<K,L> converter
  • Constructor Details

    • EntryConverterByKey

      public EntryConverterByKey(com.google.common.base.Converter<K,L> converter)
  • Method Details

    • doForward

      protected Map.Entry<L,V> doForward(Map.Entry<K,V> a)
      Specified by:
      doForward in class com.google.common.base.Converter<Map.Entry<K,V>,Map.Entry<L,V>>
    • doBackward

      protected Map.Entry<K,V> doBackward(Map.Entry<L,V> b)
      Specified by:
      doBackward in class com.google.common.base.Converter<Map.Entry<K,V>,Map.Entry<L,V>>
    • converterByKey

      public static <K, L, V> com.google.common.base.Converter<Map.Entry<K,V>,Map.Entry<L,V>> converterByKey(com.google.common.base.Converter<K,L> converter)
    • converterByValue

      public static <K, V, W> com.google.common.base.Converter<Map.Entry<K,V>,Map.Entry<K,W>> converterByValue(com.google.common.base.Converter<V,W> converter)
    • transformKey

      public static <K, L, V> Map.Entry<L,V> transformKey(Map.Entry<K,V> e, Function<? super K,? extends L> fn)
    • transformValue

      public static <K, V, W> Map.Entry<K,W> transformValue(Map.Entry<K,V> e, com.google.common.base.Converter<V,W> converter)