Share via


IMapEntry Interface

Definition

A map entry (key-value pair).

[Android.Runtime.Register("java/util/Map$Entry", "", "Java.Util.IMapEntryInvoker")]
[Java.Interop.JavaTypeParameters(new System.String[] { "K", "V" })]
public interface IMapEntry : Android.Runtime.IJavaObject, IDisposable, Java.Interop.IJavaPeerable
[<Android.Runtime.Register("java/util/Map$Entry", "", "Java.Util.IMapEntryInvoker")>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "K", "V" })>]
type IMapEntry = interface
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
Derived
Attributes
Implements

Remarks

A map entry (key-value pair). The Entry may be unmodifiable, or the value may be modifiable if the optional setValue method is implemented. The Entry may be independent of any map, or it may represent an entry of the entry-set view of a map.

Instances of the Map.Entry interface may be obtained by iterating the entry-set view of a map. These instances maintain a connection to the original, backing map. This connection to the backing map is valid only for the duration of iteration over the entry-set view. During iteration of the entry-set view, if supported by the backing map, a change to a Map.Entry's value via the Map.Entry#setValue setValue method will be visible in the backing map. The behavior of such a Map.Entry instance is undefined outside of iteration of the map's entry-set view. It is also undefined if the backing map has been modified after the Map.Entry was returned by the iterator, except through the Map.Entry.setValue method. In particular, a change to the value of a mapping in the backing map might or might not be visible in the corresponding Map.Entry element of the entry-set view.

Added in 1.2.

Java documentation for java.util.Map.Entry.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Properties

Handle

Gets the JNI value of the underlying Android object.

(Inherited from IJavaObject)
JniIdentityHashCode

Returns the value of java.lang.System.identityHashCode() for the wrapped instance.

(Inherited from IJavaPeerable)
JniManagedPeerState

State of the managed peer.

(Inherited from IJavaPeerable)
JniPeerMembers

Member access and invocation support.

(Inherited from IJavaPeerable)
Key

Returns the key.

PeerReference

Returns a JniObjectReference of the wrapped Java object instance.

(Inherited from IJavaPeerable)
Value

Returns the value.

Methods

ComparingByKey()

Returns a comparator that compares Map.Entry in natural order on key.

ComparingByKey(IComparator)

Returns a comparator that compares Map.Entry by key using the given Comparator.

ComparingByValue()

Returns a comparator that compares Map.Entry in natural order on value.

ComparingByValue(IComparator)

Returns a comparator that compares Map.Entry by value using the given Comparator.

Disposed()

Called when the instance has been disposed.

(Inherited from IJavaPeerable)
DisposeUnlessReferenced()

If there are no outstanding references to this instance, then calls Dispose(); otherwise, does nothing.

(Inherited from IJavaPeerable)
Equals(Object)

Compares the specified object with this entry for equality.

Finalized()

Called when the instance has been finalized.

(Inherited from IJavaPeerable)
GetHashCode()

Returns the hash code value for this map entry.

SetJniIdentityHashCode(Int32)

Set the value returned by JniIdentityHashCode.

(Inherited from IJavaPeerable)
SetJniManagedPeerState(JniManagedPeerStates) (Inherited from IJavaPeerable)
SetPeerReference(JniObjectReference)

Set the value returned by PeerReference.

(Inherited from IJavaPeerable)
SetValue(Object)

Replaces the value corresponding to this entry with the specified value (optional operation).

UnregisterFromRuntime()

Unregister this instance so that the runtime will not return it from future Java.Interop.JniRuntime+JniValueManager.PeekValue invocations.

(Inherited from IJavaPeerable)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to