Package com.github.tommyettinger.ds
Class IntLongMap.Entry
java.lang.Object
com.github.tommyettinger.ds.IntLongMap.Entry
- Enclosing class:
- IntLongMap
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanintgetKey()Returns the key corresponding to this entry.longgetValue()Returns the value corresponding to this entry.inthashCode()longsetValue(long value) Replaces the value corresponding to this entry with the specified value (optional operation).toString()
-
Field Details
-
key
public int key -
value
public long value
-
-
Constructor Details
-
Entry
public Entry() -
Entry
public Entry(int key, long value) -
Entry
-
-
Method Details
-
toString
-
getKey
public int getKey()Returns the key corresponding to this entry.- 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
public long 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.- Returns:
- the value corresponding to this entry
-
setValue
public long setValue(long value) 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).- 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()
-