共用方式為


Attributes.PutValue(String, String) Method

Definition

Associates the specified value with the specified attribute name, specified as a String.

[Android.Runtime.Register("putValue", "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", "GetPutValue_Ljava_lang_String_Ljava_lang_String_Handler")]
public virtual string? PutValue (string? name, string? value);
[<Android.Runtime.Register("putValue", "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", "GetPutValue_Ljava_lang_String_Ljava_lang_String_Handler")>]
abstract member PutValue : string * string -> string
override this.PutValue : string * string -> string

Parameters

name
String

the attribute name as a string

value
String

the attribute value

Returns

the previous value of the attribute, or null if none

Attributes

Remarks

Associates the specified value with the specified attribute name, specified as a String. The attributes name is case-insensitive. If the Map previously contained a mapping for the attribute name, the old value is replaced.

This method is defined as:

return (String)put(new Attributes.Name(name), value);

Java documentation for java.util.jar.Attributes.putValue(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