Language

DecimalFormat.DecimalPatternMatchRequired プロパティ

定義

<strong>[icu]</strong> 小数点の存在がパターンと一致する必要があるかどうかを返します。 または、 <strong>[icu]</strong><strong>Parsing:</strong> このメソッドは、 <em>require</em> または <em>forbid</em> 解析される文字列に小数点が存在します (既定では無効)。

public virtual bool DecimalPatternMatchRequired { [Android.Runtime.Register("isDecimalPatternMatchRequired", "()Z", "GetIsDecimalPatternMatchRequiredHandler", ApiSince=24)] get; [Android.Runtime.Register("setDecimalPatternMatchRequired", "(Z)V", "GetSetDecimalPatternMatchRequired_ZHandler", ApiSince=24)] set; }
[<get: Android.Runtime.Register("isDecimalPatternMatchRequired", "()Z", "GetIsDecimalPatternMatchRequiredHandler", ApiSince=24)>]
[<set: Android.Runtime.Register("setDecimalPatternMatchRequired", "(Z)V", "GetSetDecimalPatternMatchRequired_ZHandler", ApiSince=24)>]
member this.DecimalPatternMatchRequired : bool with get, set

プロパティ値

属性

注釈

プロパティ getter のドキュメント:

<strong>[icu]</strong> 小数点の存在がパターンと一致する必要があるかどうかを返します。

Javaドキュメント。

プロパティ セッターのドキュメント:

<strong>[icu]</strong><strong>Parsing:</strong> このメソッドは <em>require</em> または <em>forbid</em> 解析される文字列の小数点の存在に使用されます (既定では無効)。 この機能は、厳密な解析の上に厳格さの追加レイヤーとして設計されましたが、これは緩いモードまたは厳密なモードで使用できます。

小数点を<></em>するには、小数点を含むパターンまたは#setDecimalSeparatorAlwaysShownと組み合わせてこのメソッドを呼び出します。

// Require a decimal point in the string being parsed:
            df.applyPattern("#.");
            df.setDecimalPatternMatchRequired(true);

            // Alternatively:
            df.setDecimalSeparatorAlwaysShown(true);
            df.setDecimalPatternMatchRequired(true);

小数点を <em>forbid</em> するには、小数点を含まないパターンと組み合わせてこのメソッドを呼び出します。 または、パターン文字列の内容に依存せずに、同じ動作に #setParseIntegerOnly を使用します。

// Forbid a decimal point in the string being parsed:
            df.applyPattern("#");
            df.setDecimalPatternMatchRequired(true);

Javaドキュメント。

このページの一部は、によって作成および共有され、に記載されている条件に従って使用される作業に基づく変更です。

適用対象