org.modeshape.common.collection
Class ImmutableMapEntry<K,V>

java.lang.Object
  extended by org.modeshape.common.collection.ImmutableMapEntry<K,V>
Type Parameters:
K - the key type
V - the value type
All Implemented Interfaces:
Map.Entry<K,V>

@Immutable
public class ImmutableMapEntry<K,V>
extends Object
implements Map.Entry<K,V>

An immutable Map.Entry implementation.


Constructor Summary
ImmutableMapEntry(K key, V value)
           
ImmutableMapEntry(Map.Entry<K,V> entry)
           
 
Method Summary
 boolean equals(Object obj)
          
 K getKey()
          
 V getValue()
          
 V setValue(V newValue)
          
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map.Entry
hashCode
 

Constructor Detail

ImmutableMapEntry

public ImmutableMapEntry(K key,
                         V value)

ImmutableMapEntry

public ImmutableMapEntry(Map.Entry<K,V> entry)
Method Detail

getKey

public K getKey()

Specified by:
getKey in interface Map.Entry<K,V>
See Also:
Map.Entry.getKey()

getValue

public V getValue()

Specified by:
getValue in interface Map.Entry<K,V>
See Also:
Map.Entry.getValue()

setValue

public V setValue(V newValue)

Specified by:
setValue in interface Map.Entry<K,V>
See Also:
Map.Entry.setValue(java.lang.Object)

equals

public boolean equals(Object obj)

Specified by:
equals in interface Map.Entry<K,V>
Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

toString

public String toString()

Overrides:
toString in class Object
See Also:
Object.toString()


Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.