Share via


AbstractPreferences.Put(String, String) Method

Definition

Implements the put method as per the specification in Preferences#put(String,String).

[Android.Runtime.Register("put", "(Ljava/lang/String;Ljava/lang/String;)V", "GetPut_Ljava_lang_String_Ljava_lang_String_Handler")]
public override void Put (string? key, string? value);
[<Android.Runtime.Register("put", "(Ljava/lang/String;Ljava/lang/String;)V", "GetPut_Ljava_lang_String_Ljava_lang_String_Handler")>]
override this.Put : string * string -> unit

Parameters

key
String

key with which the specified value is to be associated.

value
String

value to be associated with the specified key.

Attributes

Remarks

Implements the put method as per the specification in Preferences#put(String,String).

This implementation checks that the key and value are legal, obtains this preference node's lock, checks that the node has not been removed, invokes #putSpi(String,String), and if there are any preference change listeners, enqueues a notification event for processing by the event dispatch thread.

Java documentation for java.util.prefs.AbstractPreferences.put(java.lang.String, 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