Share via


AbstractPreferences.GetSpi(String) Method

Definition

Return the value associated with the specified key at this preference node, or null if there is no association for this key, or the association cannot be determined at this time.

[Android.Runtime.Register("getSpi", "(Ljava/lang/String;)Ljava/lang/String;", "GetGetSpi_Ljava_lang_String_Handler")]
protected abstract string? GetSpi (string? key);
[<Android.Runtime.Register("getSpi", "(Ljava/lang/String;)Ljava/lang/String;", "GetGetSpi_Ljava_lang_String_Handler")>]
abstract member GetSpi : string -> string

Parameters

key
String

the key

Returns

the value associated with the specified key at this preference node, or null if there is no association for this key, or the association cannot be determined at this time.

Attributes

Remarks

Return the value associated with the specified key at this preference node, or null if there is no association for this key, or the association cannot be determined at this time. It is guaranteed that key is non-null. Also, it is guaranteed that this node has not been removed. (The implementor needn't check for either of these things.)

Generally speaking, this method should not throw an exception under any circumstances. If, however, if it does throw an exception, the exception will be intercepted and treated as a null return value.

This method is invoked with the lock on this node held.

Java documentation for java.util.prefs.AbstractPreferences.getSpi(java.lang.String).

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.

Applies to