ma.glasnost.orika
Class MapEntry<K,V>
java.lang.Object
ma.glasnost.orika.MapEntry<K,V>
- Type Parameters:
K - the key typeV - the value type
- All Implemented Interfaces:
- Map.Entry<K,V>
public class MapEntry<K,V>
- extends Object
- implements Map.Entry<K,V>
MapEntry is a concrete implementation of Map.Entry which is created for
use in registering mappings that involve java.util.Map instances.
MapEntry should be used as the type when registering a mapping between an
element type (iterable or array) and an entry type (map).
- Author:
- matt.deboer@gmail.com
value
public V value
MapEntry
public MapEntry()
MapEntry
public MapEntry(K key,
V value)
getKey
public K getKey()
- Specified by:
getKey in interface Map.Entry<K,V>
getValue
public V getValue()
- Specified by:
getValue in interface Map.Entry<K,V>
setKey
public void setKey(K key)
setValue
public V setValue(V value)
- Specified by:
setValue in interface Map.Entry<K,V>
concreteEntryType
public static <K,V> Type<MapEntry<K,V>> concreteEntryType(Type<? extends Map<K,V>> mapType)
- Returns the concrete
MapEntry<K,V> type that represents the entries of the given map
- Parameters:
mapType -
- Returns:
toString
public String toString()
- Overrides:
toString in class Object
entryType
public static <K,V> Type<Map.Entry<K,V>> entryType(Type<? extends Map<K,V>> mapType)
- Returns the
Map.Entry<K,V> type that represents the entries of the given map
- Parameters:
mapType -
- Returns:
entrySet
public static <K,V> Set<MapEntry<K,V>> entrySet(Map<K,V> map)
Copyright © 2013 Glasnost. All Rights Reserved.