Megosztás a következőn keresztül:


INavigableMap Interface

Definition

A SortedMap extended with navigation methods returning the closest matches for given search targets.

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

Remarks

A SortedMap extended with navigation methods returning the closest matches for given search targets. Methods #lowerEntry, #floorEntry, #ceilingEntry, and #higherEntry return Map.Entry objects associated with keys respectively less than, less than or equal, greater than or equal, and greater than a given key, returning null if there is no such key. Similarly, methods #lowerKey, #floorKey, #ceilingKey, and #higherKey return only the associated keys. All of these methods are designed for locating, not traversing entries.

A NavigableMap may be accessed and traversed in either ascending or descending key order. The #descendingMap method returns a view of the map with the senses of all relational and directional methods inverted. The performance of ascending operations and views is likely to be faster than that of descending ones. Methods #subMap(Object, boolean, Object, boolean) subMap(K, boolean, K, boolean), #headMap(Object, boolean) headMap(K, boolean), and #tailMap(Object, boolean) tailMap(K, boolean) differ from the like-named SortedMap methods in accepting additional arguments describing whether lower and upper bounds are inclusive versus exclusive. Submaps of any NavigableMap must implement the NavigableMap interface.

This interface additionally defines methods #firstEntry, #pollFirstEntry, #lastEntry, and #pollLastEntry that return and/or remove the least and greatest mappings, if any exist, else returning null.

Implementations of entry-returning methods are expected to return Map.Entry pairs representing snapshots of mappings at the time they were produced, and thus generally do <em>not</em> support the optional Entry.setValue method. Note however that it is possible to change mappings in the associated map using method put.

Methods #subMap(Object, Object) subMap(K, K), #headMap(Object) headMap(K), and #tailMap(Object) tailMap(K) are specified to return SortedMap to allow existing implementations of SortedMap to be compatibly retrofitted to implement NavigableMap, but extensions and implementations of this interface are encouraged to override these methods to return NavigableMap. Similarly, #keySet() can be overridden to return NavigableSet.

Added in 1.6.

Java documentation for java.util.NavigableMap.

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

CeilingEntry(Object)

Returns a key-value mapping associated with the least key greater than or equal to the given key, or null if there is no such key.

CeilingKey(Object)

Returns the least key greater than or equal to the given key, or null if there is no such key.

Clear()

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

(Inherited from IMap)
Comparator()

Returns the comparator used to order the keys in this map, or null if this map uses the Comparable natural ordering of its keys.

(Inherited from ISortedMap)
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)
DescendingKeySet()

Returns a reverse order NavigableSet view of the keys contained in this map.

DescendingMap()

Returns a reverse order view of the mappings contained in this map.

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

Returns a key-value mapping associated with the least key in this map, or null if the map is empty.

FirstKey()

Returns the first (lowest) key currently in this map.

(Inherited from ISortedMap)
FloorEntry(Object)

Returns a key-value mapping associated with the greatest key less than or equal to the given key, or null if there is no such key.

FloorKey(Object)

Returns the greatest key less than or equal to the given key, or null if there is no such key.

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)
HeadMap(Object, Boolean)

Returns a view of the portion of this map whose keys are less than (or equal to, if inclusive is true) toKey.

HeadMap(Object)

To be added

HigherEntry(Object)

Returns a key-value mapping associated with the least key strictly greater than the given key, or null if there is no such key.

HigherKey(Object)

Returns the least key strictly greater than the given key, or null if there is no such key.

KeySet()

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

(Inherited from ISortedMap)
LastEntry()

Returns a key-value mapping associated with the greatest key in this map, or null if the map is empty.

LastKey()

Returns the last (highest) key currently in this map.

(Inherited from ISortedMap)
LowerEntry(Object)

Returns a key-value mapping associated with the greatest key strictly less than the given key, or null if there is no such key.

LowerKey(Object)

Returns the greatest key strictly less than the given key, or null if there is no such key.

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

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

PollFirstEntry()

Removes and returns a key-value mapping associated with the least key in this map, or null if the map is empty.

PollLastEntry()

Removes and returns a key-value mapping associated with the greatest key in this map, or null if the map is empty.

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)
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)
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)
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)
SubMap(Object, Boolean, Object, Boolean)

Returns a view of the portion of this map whose keys range from fromKey to toKey.

SubMap(Object, Object)

To be added

TailMap(Object, Boolean)

Returns a view of the portion of this map whose keys are greater than (or equal to, if inclusive is true) fromKey.

TailMap(Object)

To be added

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

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to