다음을 통해 공유


NumberFormat.Format Method

Definition

Overloads

Format(Int64, StringBuffer, FieldPosition)

Specialization of format.

Format(Double, StringBuffer, FieldPosition)

Specialization of format.

Format(BigInteger, StringBuffer, FieldPosition)

<strong>[icu]</strong> Formats a BigInteger.

Format(Object, StringBuffer, FieldPosition)

Formats a number and appends the resulting text to the given string buffer.

Format(CurrencyAmount, StringBuffer, FieldPosition)

<strong>[icu]</strong> Formats a CurrencyAmount.

Format(BigDecimal, StringBuffer, FieldPosition)

<strong>[icu]</strong> Formats an ICU BigDecimal.

Format(BigDecimal, StringBuffer, FieldPosition)

<strong>[icu]</strong> Formats a BigDecimal.

Format(Double)

Specialization of format.

Format(BigInteger)

<strong>[icu]</strong> Convenience method to format a BigInteger.

Format(BigDecimal)

Convenience method to format a BigDecimal.

Format(CurrencyAmount)

<strong>[icu]</strong> Convenience method to format a CurrencyAmount.

Format(BigDecimal)

<strong>[icu]</strong> Convenience method to format an ICU BigDecimal.

Format(Int64)

Specialization of format.

Format(Int64, StringBuffer, FieldPosition)

Specialization of format.

[Android.Runtime.Register("format", "(JLjava/lang/StringBuffer;Ljava/text/FieldPosition;)Ljava/lang/StringBuffer;", "GetFormat_JLjava_lang_StringBuffer_Ljava_text_FieldPosition_Handler", ApiSince=24)]
public abstract Java.Lang.StringBuffer? Format (long number, Java.Lang.StringBuffer? toAppendTo, Java.Text.FieldPosition? pos);
[<Android.Runtime.Register("format", "(JLjava/lang/StringBuffer;Ljava/text/FieldPosition;)Ljava/lang/StringBuffer;", "GetFormat_JLjava_lang_StringBuffer_Ljava_text_FieldPosition_Handler", ApiSince=24)>]
override this.Format : int64 * Java.Lang.StringBuffer * Java.Text.FieldPosition -> Java.Lang.StringBuffer

Parameters

number
Int64
toAppendTo
StringBuffer

Returns

Attributes

Remarks

Specialization of format.

Java documentation for android.icu.text.NumberFormat.format(long, java.lang.StringBuffer, java.text.FieldPosition).

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

Format(Double, StringBuffer, FieldPosition)

Specialization of format.

[Android.Runtime.Register("format", "(DLjava/lang/StringBuffer;Ljava/text/FieldPosition;)Ljava/lang/StringBuffer;", "GetFormat_DLjava_lang_StringBuffer_Ljava_text_FieldPosition_Handler", ApiSince=24)]
public abstract Java.Lang.StringBuffer? Format (double number, Java.Lang.StringBuffer? toAppendTo, Java.Text.FieldPosition? pos);
[<Android.Runtime.Register("format", "(DLjava/lang/StringBuffer;Ljava/text/FieldPosition;)Ljava/lang/StringBuffer;", "GetFormat_DLjava_lang_StringBuffer_Ljava_text_FieldPosition_Handler", ApiSince=24)>]
override this.Format : double * Java.Lang.StringBuffer * Java.Text.FieldPosition -> Java.Lang.StringBuffer

Parameters

number
Double
toAppendTo
StringBuffer

Returns

Attributes

Remarks

Specialization of format.

Java documentation for android.icu.text.NumberFormat.format(double, java.lang.StringBuffer, java.text.FieldPosition).

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

Format(BigInteger, StringBuffer, FieldPosition)

<strong>[icu]</strong> Formats a BigInteger.

[Android.Runtime.Register("format", "(Ljava/math/BigInteger;Ljava/lang/StringBuffer;Ljava/text/FieldPosition;)Ljava/lang/StringBuffer;", "GetFormat_Ljava_math_BigInteger_Ljava_lang_StringBuffer_Ljava_text_FieldPosition_Handler", ApiSince=24)]
public abstract Java.Lang.StringBuffer? Format (Java.Math.BigInteger? number, Java.Lang.StringBuffer? toAppendTo, Java.Text.FieldPosition? pos);
[<Android.Runtime.Register("format", "(Ljava/math/BigInteger;Ljava/lang/StringBuffer;Ljava/text/FieldPosition;)Ljava/lang/StringBuffer;", "GetFormat_Ljava_math_BigInteger_Ljava_lang_StringBuffer_Ljava_text_FieldPosition_Handler", ApiSince=24)>]
override this.Format : Java.Math.BigInteger * Java.Lang.StringBuffer * Java.Text.FieldPosition -> Java.Lang.StringBuffer

Parameters

number
BigInteger
toAppendTo
StringBuffer

Returns

Attributes

Remarks

<strong>[icu]</strong> Formats a BigInteger. Specialization of format.

Java documentation for android.icu.text.NumberFormat.format(java.math.BigInteger, java.lang.StringBuffer, java.text.FieldPosition).

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

Format(Object, StringBuffer, FieldPosition)

Formats a number and appends the resulting text to the given string buffer.

[Android.Runtime.Register("format", "(Ljava/lang/Object;Ljava/lang/StringBuffer;Ljava/text/FieldPosition;)Ljava/lang/StringBuffer;", "GetFormat_Ljava_lang_Object_Ljava_lang_StringBuffer_Ljava_text_FieldPosition_Handler", ApiSince=24)]
public override Java.Lang.StringBuffer? Format (Java.Lang.Object? number, Java.Lang.StringBuffer? toAppendTo, Java.Text.FieldPosition? pos);
[<Android.Runtime.Register("format", "(Ljava/lang/Object;Ljava/lang/StringBuffer;Ljava/text/FieldPosition;)Ljava/lang/StringBuffer;", "GetFormat_Ljava_lang_Object_Ljava_lang_StringBuffer_Ljava_text_FieldPosition_Handler", ApiSince=24)>]
override this.Format : Java.Lang.Object * Java.Lang.StringBuffer * Java.Text.FieldPosition -> Java.Lang.StringBuffer

Parameters

number
Object
toAppendTo
StringBuffer

Returns

Attributes

Remarks

Formats a number and appends the resulting text to the given string buffer. <strong>[icu] Note:</strong> recognizes BigInteger and BigDecimal objects.

Java documentation for android.icu.text.NumberFormat.format(java.lang.Object, java.lang.StringBuffer, java.text.FieldPosition).

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

Format(CurrencyAmount, StringBuffer, FieldPosition)

<strong>[icu]</strong> Formats a CurrencyAmount.

[Android.Runtime.Register("format", "(Landroid/icu/util/CurrencyAmount;Ljava/lang/StringBuffer;Ljava/text/FieldPosition;)Ljava/lang/StringBuffer;", "GetFormat_Landroid_icu_util_CurrencyAmount_Ljava_lang_StringBuffer_Ljava_text_FieldPosition_Handler", ApiSince=24)]
public virtual Java.Lang.StringBuffer? Format (Android.Icu.Util.CurrencyAmount? currAmt, Java.Lang.StringBuffer? toAppendTo, Java.Text.FieldPosition? pos);
[<Android.Runtime.Register("format", "(Landroid/icu/util/CurrencyAmount;Ljava/lang/StringBuffer;Ljava/text/FieldPosition;)Ljava/lang/StringBuffer;", "GetFormat_Landroid_icu_util_CurrencyAmount_Ljava_lang_StringBuffer_Ljava_text_FieldPosition_Handler", ApiSince=24)>]
override this.Format : Android.Icu.Util.CurrencyAmount * Java.Lang.StringBuffer * Java.Text.FieldPosition -> Java.Lang.StringBuffer

Parameters

currAmt
CurrencyAmount
toAppendTo
StringBuffer

Returns

Attributes

Remarks

<strong>[icu]</strong> Formats a CurrencyAmount. Specialization of format.

Java documentation for android.icu.text.NumberFormat.format(android.icu.util.CurrencyAmount, java.lang.StringBuffer, java.text.FieldPosition).

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

Format(BigDecimal, StringBuffer, FieldPosition)

<strong>[icu]</strong> Formats an ICU BigDecimal.

[Android.Runtime.Register("format", "(Landroid/icu/math/BigDecimal;Ljava/lang/StringBuffer;Ljava/text/FieldPosition;)Ljava/lang/StringBuffer;", "GetFormat_Landroid_icu_math_BigDecimal_Ljava_lang_StringBuffer_Ljava_text_FieldPosition_Handler", ApiSince=24)]
public abstract Java.Lang.StringBuffer? Format (Android.Icu.Math.BigDecimal? number, Java.Lang.StringBuffer? toAppendTo, Java.Text.FieldPosition? pos);
[<Android.Runtime.Register("format", "(Landroid/icu/math/BigDecimal;Ljava/lang/StringBuffer;Ljava/text/FieldPosition;)Ljava/lang/StringBuffer;", "GetFormat_Landroid_icu_math_BigDecimal_Ljava_lang_StringBuffer_Ljava_text_FieldPosition_Handler", ApiSince=24)>]
override this.Format : Android.Icu.Math.BigDecimal * Java.Lang.StringBuffer * Java.Text.FieldPosition -> Java.Lang.StringBuffer

Parameters

number
BigDecimal
toAppendTo
StringBuffer

Returns

Attributes

Remarks

<strong>[icu]</strong> Formats an ICU BigDecimal. Specialization of format.

Java documentation for android.icu.text.NumberFormat.format(android.icu.math.BigDecimal, java.lang.StringBuffer, java.text.FieldPosition).

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

Format(BigDecimal, StringBuffer, FieldPosition)

<strong>[icu]</strong> Formats a BigDecimal.

[Android.Runtime.Register("format", "(Ljava/math/BigDecimal;Ljava/lang/StringBuffer;Ljava/text/FieldPosition;)Ljava/lang/StringBuffer;", "GetFormat_Ljava_math_BigDecimal_Ljava_lang_StringBuffer_Ljava_text_FieldPosition_Handler", ApiSince=24)]
public abstract Java.Lang.StringBuffer? Format (Java.Math.BigDecimal? number, Java.Lang.StringBuffer? toAppendTo, Java.Text.FieldPosition? pos);
[<Android.Runtime.Register("format", "(Ljava/math/BigDecimal;Ljava/lang/StringBuffer;Ljava/text/FieldPosition;)Ljava/lang/StringBuffer;", "GetFormat_Ljava_math_BigDecimal_Ljava_lang_StringBuffer_Ljava_text_FieldPosition_Handler", ApiSince=24)>]
override this.Format : Java.Math.BigDecimal * Java.Lang.StringBuffer * Java.Text.FieldPosition -> Java.Lang.StringBuffer

Parameters

number
BigDecimal
toAppendTo
StringBuffer

Returns

Attributes

Remarks

<strong>[icu]</strong> Formats a BigDecimal. Specialization of format.

Java documentation for android.icu.text.NumberFormat.format(java.math.BigDecimal, java.lang.StringBuffer, java.text.FieldPosition).

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

Format(Double)

Specialization of format.

[Android.Runtime.Register("format", "(D)Ljava/lang/String;", "", ApiSince=24)]
public string? Format (double number);
[<Android.Runtime.Register("format", "(D)Ljava/lang/String;", "", ApiSince=24)>]
override this.Format : double -> string

Parameters

number
Double

Returns

Attributes

Remarks

Specialization of format.

Java documentation for android.icu.text.NumberFormat.format(double).

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

Format(BigInteger)

<strong>[icu]</strong> Convenience method to format a BigInteger.

[Android.Runtime.Register("format", "(Ljava/math/BigInteger;)Ljava/lang/String;", "", ApiSince=24)]
public string? Format (Java.Math.BigInteger? number);
[<Android.Runtime.Register("format", "(Ljava/math/BigInteger;)Ljava/lang/String;", "", ApiSince=24)>]
override this.Format : Java.Math.BigInteger -> string

Parameters

number
BigInteger

Returns

Attributes

Remarks

<strong>[icu]</strong> Convenience method to format a BigInteger.

Java documentation for android.icu.text.NumberFormat.format(java.math.BigInteger).

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

Format(BigDecimal)

Convenience method to format a BigDecimal.

[Android.Runtime.Register("format", "(Ljava/math/BigDecimal;)Ljava/lang/String;", "", ApiSince=24)]
public string? Format (Java.Math.BigDecimal? number);
[<Android.Runtime.Register("format", "(Ljava/math/BigDecimal;)Ljava/lang/String;", "", ApiSince=24)>]
override this.Format : Java.Math.BigDecimal -> string

Parameters

number
BigDecimal

Returns

Attributes

Remarks

Convenience method to format a BigDecimal.

Java documentation for android.icu.text.NumberFormat.format(java.math.BigDecimal).

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

Format(CurrencyAmount)

<strong>[icu]</strong> Convenience method to format a CurrencyAmount.

[Android.Runtime.Register("format", "(Landroid/icu/util/CurrencyAmount;)Ljava/lang/String;", "", ApiSince=24)]
public string? Format (Android.Icu.Util.CurrencyAmount? currAmt);
[<Android.Runtime.Register("format", "(Landroid/icu/util/CurrencyAmount;)Ljava/lang/String;", "", ApiSince=24)>]
override this.Format : Android.Icu.Util.CurrencyAmount -> string

Parameters

currAmt
CurrencyAmount

Returns

Attributes

Remarks

<strong>[icu]</strong> Convenience method to format a CurrencyAmount.

Java documentation for android.icu.text.NumberFormat.format(android.icu.util.CurrencyAmount).

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

Format(BigDecimal)

<strong>[icu]</strong> Convenience method to format an ICU BigDecimal.

[Android.Runtime.Register("format", "(Landroid/icu/math/BigDecimal;)Ljava/lang/String;", "", ApiSince=24)]
public string? Format (Android.Icu.Math.BigDecimal? number);
[<Android.Runtime.Register("format", "(Landroid/icu/math/BigDecimal;)Ljava/lang/String;", "", ApiSince=24)>]
override this.Format : Android.Icu.Math.BigDecimal -> string

Parameters

number
BigDecimal

Returns

Attributes

Remarks

<strong>[icu]</strong> Convenience method to format an ICU BigDecimal.

Java documentation for android.icu.text.NumberFormat.format(android.icu.math.BigDecimal).

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

Format(Int64)

Specialization of format.

[Android.Runtime.Register("format", "(J)Ljava/lang/String;", "", ApiSince=24)]
public string? Format (long number);
[<Android.Runtime.Register("format", "(J)Ljava/lang/String;", "", ApiSince=24)>]
override this.Format : int64 -> string

Parameters

number
Int64

Returns

Attributes

Remarks

Specialization of format.

Java documentation for android.icu.text.NumberFormat.format(long).

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