次の方法で共有


MessageFormat.SetFormatsByArgumentIndex(_Format[]) Method

Definition

Sets the formats to use for the values passed into format methods or returned from parse methods.

[Android.Runtime.Register("setFormatsByArgumentIndex", "([Ljava/text/Format;)V", "GetSetFormatsByArgumentIndex_arrayLjava_text_Format_Handler")]
public virtual void SetFormatsByArgumentIndex (Java.Text._Format[]? newFormats);
[<Android.Runtime.Register("setFormatsByArgumentIndex", "([Ljava/text/Format;)V", "GetSetFormatsByArgumentIndex_arrayLjava_text_Format_Handler")>]
abstract member SetFormatsByArgumentIndex : Java.Text._Format[] -> unit
override this.SetFormatsByArgumentIndex : Java.Text._Format[] -> unit

Parameters

newFormats
_Format[]

the new formats to use

Attributes

Remarks

Sets the formats to use for the values passed into format methods or returned from parse methods. The indices of elements in newFormats correspond to the argument indices used in the previously set pattern string. The order of formats in newFormats thus corresponds to the order of elements in the arguments array passed to the format methods or the result array returned by the parse methods.

If an argument index is used for more than one format element in the pattern string, then the corresponding new format is used for all such format elements. If an argument index is not used for any format element in the pattern string, then the corresponding new format is ignored. If fewer formats are provided than needed, then only the formats for argument indices less than newFormats.length are replaced.

Added in 1.4.

Java documentation for java.text.MessageFormat.setFormatsByArgumentIndex(java.text.Format[]).

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