ma.glasnost.orika
Class MapEntry<K,V>

java.lang.Object
  extended by ma.glasnost.orika.MapEntry<K,V>
Type Parameters:
K - the key type
V - 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

Field Summary
 V value
           
 
Constructor Summary
MapEntry()
           
MapEntry(K key, V value)
           
 
Method Summary
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
static
<K,V> Set<MapEntry<K,V>>
entrySet(Map<K,V> map)
           
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
 K getKey()
           
 V getValue()
           
 void setKey(K key)
           
 V setValue(V value)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map.Entry
equals, hashCode
 

Field Detail

value

public V value
Constructor Detail

MapEntry

public MapEntry()

MapEntry

public MapEntry(K key,
                V value)
Method Detail

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.