AbstractMap.SimpleEntry (Java SE 26 & JDK 26)
- Type Parameters:
K- the type of keyV- the type of the value
- All Implemented Interfaces:
Serializable, Map.Entry<K,V>
- Enclosing class:
AbstractMap<K,V>
-
Constructor Summary
Constructors
SimpleEntry(Map.Entry<? extends K, ? extends V> entry) Creates an entry representing the same mapping as the specified entry.
SimpleEntry(K key, V value) Creates an entry representing a mapping from the specified key to the specified value.
-
Method Summary
booleanCompares the specified object with this entry for equality.
getKey()Returns the key corresponding to this entry.
getValue()Returns the value corresponding to this entry.
inthashCode()Returns the hash code value for this map entry.
Replaces the value corresponding to this entry with the specified value.
toString()Returns a String representation of this map entry.
Methods declared in class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitCreates and returns a copy of this object.
protected voidDeprecated, for removal: This API element is subject to removal in a future version.
Returns the runtime class of this
Object.final voidWakes up a single thread that is waiting on this object's monitor.
final voidWakes up all threads that are waiting on this object's monitor.
final voidCauses the current thread to wait until it is awakened, typically by being notified or interrupted.
final voidwait(long timeoutMillis) Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.
final voidwait(long timeoutMillis, int nanos) Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.
-
Constructor Details
-
SimpleEntry
-
SimpleEntry
-
-
Method Details
-
getKey
-
getValue
-
setValue
-
equals
-
hashCode
-
toString
-