org.omnaest.utils.structure.map
Class SimpleEntry<K,V>
java.lang.Object
org.omnaest.utils.structure.map.SimpleEntry<K,V>
- Type Parameters:
K - V -
- All Implemented Interfaces:
- Map.Entry<K,V>
public class SimpleEntry<K,V>
- extends Object
- implements Map.Entry<K,V>
Simple entity implementation for an Map.Entry
- Author:
- Omnaest
key
protected K key
value
protected V value
SimpleEntry
public SimpleEntry(K key,
V value)
- Parameters:
key - value -
SimpleEntry
public SimpleEntry(Map.Entry<K,V> entry)
- Parameters:
entry - - See Also:
SimpleEntry
inverted
public Map.Entry<V,K> inverted()
- Returns an inverted
Map.Entry view of the current Map.Entry. Changes to each instance will affect the others.
- Returns:
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>
setValue
public V setValue(V value)
- Specified by:
setValue in interface Map.Entry<K,V>
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2013. All Rights Reserved.