Langue

DecimalFormat.MathContext Propriété

Définition

<strong>[icu]</strong> Renvoie l’être java.math.MathContext utilisé pour arrondir les nombres. -ou- <strong>[icu]</strong>><rounding and Digit Limits :</strong> Sets the java.math.MathContext used to round numbers.

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

Valeur de propriété

Attributs

Remarques

Documentation getter de propriété :

<strong>[icu]</strong> Renvoie l’être java.math.MathContext utilisé pour arrondir les nombres.

Java documentation pour android.icu.text.DecimalFormat.getMathContext().

Documentation du jeu de propriétés :

<strong>[icu]</strong><Rounding>and Digit Limits :</strong> Définit l’utilisation java.math.MathContext pour arrondir les nombres. Un « contexte mathématique » encode à la fois un mode arrondi et un certain nombre de chiffres significatifs. La plupart des utilisateurs doivent appeler #setRoundingMode et/ou #setMaximumSignificantDigits au lieu de cette méthode.

Lors de la mise en forme, étant donné qu’aucune division n’est jamais effectuée, mathContext par défaut est des chiffres significatifs illimités. Toutefois, lorsque la division se produit pendant l’analyse pour corriger les pourcentages et les multiplicateurs, un MathContext de 34 chiffres, la norme IEEE 754R Decimal128, est utilisée par défaut. Si vous avez besoin de plus de 34 chiffres lors de l’analyse, vous pouvez définir un MathContext personnalisé à l’aide de cette méthode.

Java documentation pour android.icu.text.DecimalFormat.setMathContext(java.math.MathContext).

Les parties de cette page sont des modifications basées sur le travail créé et partagé par Android Open Source et utilisées en fonction des termes décrits dans la Creative Commons 2.5 Attribution License.

S’applique à