Package com.github.tommyettinger.ds
Class ObjectObjectMap.Entry<K,V>
java.lang.Object
com.github.tommyettinger.ds.ObjectObjectMap.Entry<K,V>
- All Implemented Interfaces:
Map.Entry<K,V>
- Direct Known Subclasses:
CaseInsensitiveMap.Entry
- Enclosing class:
- ObjectObjectMap<K,
V>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
key
-
value
-
-
Constructor Details
-
Entry
public Entry() -
Entry
-
Entry
-
-
Method Details
-
toString
-
getKey
Returns the key corresponding to this entry.- Specified by:
getKeyin interfaceMap.Entry<K,V> - Returns:
- the key corresponding to this entry
- Throws:
IllegalStateException- implementations may, but are not required to, throw this exception if the entry has been removed from the backing map.
-
getValue
Returns the value corresponding to this entry. If the mapping has been removed from the backing map (by the iterator'sremoveoperation), the results of this call are undefined.- Specified by:
getValuein interfaceMap.Entry<K,V> - Returns:
- the value corresponding to this entry
- Throws:
IllegalStateException- implementations may, but are not required to, throw this exception if the entry has been removed from the backing map.
-
setValue
Replaces the value corresponding to this entry with the specified value (optional operation). (Writes through to the map.) The behavior of this call is undefined if the mapping has already been removed from the map (by the iterator'sremoveoperation).- Specified by:
setValuein interfaceMap.Entry<K,V> - Parameters:
value- new value to be stored in this entry- Returns:
- old value corresponding to the entry
- Throws:
UnsupportedOperationException- if theputoperation is not supported by the backing mapClassCastException- if the class of the specified value prevents it from being stored in the backing mapNullPointerException- if the backing map does not permit null values, and the specified value is nullIllegalArgumentException- if some property of this value prevents it from being stored in the backing mapIllegalStateException- implementations may, but are not required to, throw this exception if the entry has been removed from the backing map.
-
equals
-
hashCode
public int hashCode()
-