DecimalFormat.MathContext Proprietà

Definizione

<strong>[icu]</strong> Restituisce l'oggetto java.math.MathContext usato per arrotondare i numeri. -oppure- <strong>[icu]</strong>><Rounding and Digit Limits:</strong> Imposta l'oggetto usato per arrotondare i java.math.MathContext numeri.

public virtual Java.Math.MathContext? MathContext { [Android.Runtime.Register("getMathContext", "()Ljava/math/MathContext;", "GetGetMathContextHandler", ApiSince=24)] get; [Android.Runtime.Register("setMathContext", "(Ljava/math/MathContext;)V", "GetSetMathContext_Ljava_math_MathContext_Handler", ApiSince=24)] set; }
[<get: Android.Runtime.Register("getMathContext", "()Ljava/math/MathContext;", "GetGetMathContextHandler", ApiSince=24)>]
[<set: Android.Runtime.Register("setMathContext", "(Ljava/math/MathContext;)V", "GetSetMathContext_Ljava_math_MathContext_Handler", ApiSince=24)>]
member this.MathContext : Java.Math.MathContext with get, set

Valore della proprietà

Attributi

Commenti

Documentazione del getter delle proprietà:

<strong>[icu]</strong> Restituisce l'oggetto java.math.MathContext usato per arrotondare i numeri.

per android.icu.text.DecimalFormat.getMathContext().

Documentazione del setter delle proprietà:

<strong>[icu]</strong><>Rounding and Digit Limits:</strong> Imposta l'oggetto java.math.MathContext usato per arrotondare i numeri. Un "contesto matematico" codifica sia una modalità di arrotondamento che una serie di cifre significative. La maggior parte degli utenti deve chiamare #setRoundingMode e/o #setMaximumSignificantDigits anziché questo metodo.

Durante la formattazione, poiché non viene mai eseguita alcuna divisione, l'impostazione predefinita MathContext è di cifre significative illimitate. Tuttavia, quando si verifica la divisione durante l'analisi per correggere le percentuali e i moltiplicatori, per impostazione predefinita viene usato un mathContext di 34 cifre, lo standard IEEE 754R Decimal128. Se sono necessarie più di 34 cifre durante l'analisi, è possibile impostare un oggetto MathContext personalizzato usando questo metodo.

per android.icu.text.DecimalFormat.setMathContext(java.math.MathContext).

Le parti di questa pagina sono modifiche basate sul lavoro creato e condiviso dalla e usati in base ai termini descritti in Creative License 2.5 Attribution License.

Si applica a