classlib: remove hardcoded dependecy to TRoundingMode in NumberFormat

This commit is contained in:
Bernd Busse 2023-07-27 21:07:29 +02:00 committed by Alexey Andreev
parent d067b986df
commit be09e698ea

View File

@ -15,9 +15,9 @@
*/ */
package org.teavm.classlib.java.text; package org.teavm.classlib.java.text;
import java.math.RoundingMode;
import java.util.Objects; import java.util.Objects;
import org.teavm.classlib.impl.unicode.CLDRHelper; import org.teavm.classlib.impl.unicode.CLDRHelper;
import org.teavm.classlib.java.math.TRoundingMode;
import org.teavm.classlib.java.util.TCurrency; import org.teavm.classlib.java.util.TCurrency;
import org.teavm.classlib.java.util.TLocale; import org.teavm.classlib.java.util.TLocale;
@ -30,7 +30,7 @@ public abstract class TNumberFormat extends TFormat {
private int minimumIntegerDigits = 1; private int minimumIntegerDigits = 1;
private int maximumFractionDigits = 3; private int maximumFractionDigits = 3;
private int minimumFractionDigits; private int minimumFractionDigits;
private TRoundingMode roundingMode = TRoundingMode.HALF_EVEN; private RoundingMode roundingMode = RoundingMode.HALF_EVEN;
TCurrency currency = TCurrency.getInstance(TLocale.getDefault()); TCurrency currency = TCurrency.getInstance(TLocale.getDefault());
public TNumberFormat() { public TNumberFormat() {
@ -238,11 +238,11 @@ public abstract class TNumberFormat extends TFormat {
parseIntegerOnly = value; parseIntegerOnly = value;
} }
public TRoundingMode getRoundingMode() { public RoundingMode getRoundingMode() {
return roundingMode; return roundingMode;
} }
public void setRoundingMode(TRoundingMode roundingMode) { public void setRoundingMode(RoundingMode roundingMode) {
this.roundingMode = roundingMode; this.roundingMode = roundingMode;
} }