it.unimi.dsi.fastutil.objects
Class AbstractObject2IntMap.BasicEntry<K>

java.lang.Object
  extended by it.unimi.dsi.fastutil.objects.AbstractObject2IntMap.BasicEntry<K>
All Implemented Interfaces:
Object2IntMap.Entry<K>, Map.Entry<K,Integer>
Enclosing class:
AbstractObject2IntMap<K>

public static class AbstractObject2IntMap.BasicEntry<K>
extends Object
implements Object2IntMap.Entry<K>

This class provides a basic but complete type-specific entry class for all those maps implementations that do not have entries on their own (e.g., most immutable maps).

This class does not implement setValue(), as the modification would not be reflected in the base map.


Field Summary
protected  K key
           
protected  int value
           
 
Constructor Summary
AbstractObject2IntMap.BasicEntry(K key, int value)
           
AbstractObject2IntMap.BasicEntry(K key, Integer value)
           
 
Method Summary
 boolean equals(Object o)
           
 int getIntValue()
           
 K getKey()
           
 Integer getValue()
           
 int hashCode()
           
 int setValue(int value)
           
 Integer setValue(Integer value)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

key

protected K key

value

protected int value
Constructor Detail

AbstractObject2IntMap.BasicEntry

public AbstractObject2IntMap.BasicEntry(K key,
                                        Integer value)

AbstractObject2IntMap.BasicEntry

public AbstractObject2IntMap.BasicEntry(K key,
                                        int value)
Method Detail

getKey

public K getKey()
Specified by:
getKey in interface Map.Entry<K,Integer>

getValue

public Integer getValue()
Specified by:
getValue in interface Map.Entry<K,Integer>

getIntValue

public int getIntValue()
Specified by:
getIntValue in interface Object2IntMap.Entry<K>
See Also:
Map.Entry.getValue()

setValue

public int setValue(int value)
Specified by:
setValue in interface Object2IntMap.Entry<K>
See Also:
Map.Entry.setValue(Object)

setValue

public Integer setValue(Integer value)
Specified by:
setValue in interface Map.Entry<K,Integer>

equals

public boolean equals(Object o)
Specified by:
equals in interface Map.Entry<K,Integer>
Overrides:
equals in class Object

hashCode

public int hashCode()
Specified by:
hashCode in interface Map.Entry<K,Integer>
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2011. All Rights Reserved.