다음을 통해 공유


ISequencedMap Interface

Definition

A Map that has a well-defined encounter order, that supports operations at both ends, and that is reversible.

[Android.Runtime.Register("java/util/SequencedMap", "", "Java.Util.ISequencedMapInvoker", ApiSince=35)]
[Java.Interop.JavaTypeParameters(new System.String[] { "K", "V" })]
public interface ISequencedMap : IDisposable, Java.Interop.IJavaPeerable, Java.Util.IMap
[<Android.Runtime.Register("java/util/SequencedMap", "", "Java.Util.ISequencedMapInvoker", ApiSince=35)>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "K", "V" })>]
type ISequencedMap = interface
    interface IMap
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
Derived
Attributes
Implements

Remarks

A Map that has a well-defined encounter order, that supports operations at both ends, and that is reversible. The encounter order of a SequencedMap is similar to that of the elements of a SequencedCollection, but the ordering applies to mappings instead of individual elements.

The bulk operations on this map, including the #forEach forEach and the #replaceAll replaceAll methods, operate on this map's mappings in encounter order.

The view collections provided by the #keySet keySet, #values values, #entrySet entrySet, #sequencedKeySet sequencedKeySet, #sequencedValues sequencedValues, and #sequencedEntrySet sequencedEntrySet methods all reflect the encounter order of this map. Even though the return values of the keySet, values, and entrySet methods are not sequenced types, the elements in those view collections do reflect the encounter order of this map. Thus, the iterators returned by the statements {

Added in 21.

Java documentation for java.util.SequencedMap.

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)
IsEmpty

Returns whether this map is empty.

(Inherited from IMap)
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)
PeerReference

Returns a JniObjectReference of the wrapped Java object instance.

(Inherited from IJavaPeerable)

Methods

Clear()

Removes all of the mappings from this map (optional operation).

(Inherited from IMap)
Compute(Object, IBiFunction)

Attempts to compute a mapping for the specified key and its current mapped value (or null if there is no current mapping).

(Inherited from IMap)
ComputeIfAbsent(Object, IFunction)

If the specified key is not already associated with a value (or is mapped to null), attempts to compute its value using the given mapping function and enters it into this map unless null.

(Inherited from IMap)
ComputeIfPresent(Object, IBiFunction)

If the value for the specified key is present and non-null, attempts to compute a new mapping given the key and its current mapped value.

(Inherited from IMap)
ContainsKey(Object)

Returns true if this map contains a mapping for the specified key.

(Inherited from IMap)
ContainsValue(Object)

Returns true if this map maps one or more keys to the specified value.

(Inherited from IMap)
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)
EntrySet()

Returns a Set view of the mappings contained in this map.

(Inherited from IMap)
Equals(Object)

Compares the specified object with this map for equality.

(Inherited from IMap)
Finalized()

Called when the instance has been finalized.

(Inherited from IJavaPeerable)
FirstEntry()
ForEach(IBiConsumer)

Performs the given action for each entry in this map until all entries have been processed or the action throws an exception.

(Inherited from IMap)
Get(Object)

Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key.

(Inherited from IMap)
GetHashCode()

Returns the hash code value for this map.

(Inherited from IMap)
GetOrDefault(Object, Object)

Returns the value to which the specified key is mapped, or defaultValue if this map contains no mapping for the key.

(Inherited from IMap)
KeySet()

Returns a Set view of the keys contained in this map.

(Inherited from IMap)
LastEntry()
Merge(Object, Object, IBiFunction)

If the specified key is not already associated with a value or is associated with null, associates it with the given non-null value.

(Inherited from IMap)
PollFirstEntry()
PollLastEntry()
Put(Object, Object)

Associates the specified value with the specified key in this map (optional operation).

(Inherited from IMap)
PutAll(IDictionary)

Copies all of the mappings from the specified map to this map (optional operation).

(Inherited from IMap)
PutFirst(Object, Object)

Inserts the given mapping into the map if it is not already present, or replaces the value of a mapping if it is already present (optional operation).

PutIfAbsent(Object, Object)

If the specified key is not already associated with a value (or is mapped to null) associates it with the given value and returns null, else returns the current value.

(Inherited from IMap)
PutLast(Object, Object)

Inserts the given mapping into the map if it is not already present, or replaces the value of a mapping if it is already present (optional operation).

Remove(Object, Object)

Removes the entry for the specified key only if it is currently mapped to the specified value.

(Inherited from IMap)
Remove(Object)

Removes the mapping for a key from this map if it is present (optional operation).

(Inherited from IMap)
Replace(Object, Object, Object)

Replaces the entry for the specified key only if currently mapped to the specified value.

(Inherited from IMap)
Replace(Object, Object)

Replaces the entry for the specified key only if it is currently mapped to some value.

(Inherited from IMap)
ReplaceAll(IBiFunction)

Replaces each entry's value with the result of invoking the given function on that entry until all entries have been processed or the function throws an exception.

(Inherited from IMap)
Reversed()

Returns a reverse-ordered view of this map.

SequencedEntrySet()

Returns a SequencedSet view of this map's #entrySet entrySet.

SequencedKeySet()

Returns a SequencedSet view of this map's #keySet keySet.

SequencedValues()

Returns a SequencedCollection view of this map's #values values collection.

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)
Size()

Returns the number of key-value mappings in this map.

(Inherited from IMap)
UnregisterFromRuntime()

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

(Inherited from IJavaPeerable)
Values()

Returns a Collection view of the values contained in this map.

(Inherited from IMap)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Gets the JNI name of the type of the instance self.

JavaAs<TResult>(IJavaPeerable)

Try to coerce self to type TResult, checking that the coercion is valid on the Java side.

TryJavaCast<TResult>(IJavaPeerable, TResult)

Try to coerce self to type TResult, checking that the coercion is valid on the Java side.

Applies to