ICU-13177 Moving CompactType to public CompactDecimalFormat.java

X-SVN-Rev: 40088
This commit is contained in:
Shane Carr 2017-04-28 23:47:51 +00:00
parent ff5e1bfd6b
commit 03eae5bec0
2 changed files with 21 additions and 6 deletions

View File

@ -23,6 +23,7 @@ import com.ibm.icu.impl.number.modifiers.ConstantAffixModifier;
import com.ibm.icu.impl.number.modifiers.PositiveNegativeAffixModifier;
import com.ibm.icu.impl.number.rounders.SignificantDigitsRounder;
import com.ibm.icu.text.CompactDecimalFormat.CompactStyle;
import com.ibm.icu.text.CompactDecimalFormat.CompactType;
import com.ibm.icu.text.DecimalFormat.SignificantDigitsMode;
import com.ibm.icu.text.DecimalFormatSymbols;
import com.ibm.icu.text.NumberFormat;
@ -326,12 +327,6 @@ public class CompactDecimalFormat extends Format.BeforeFormat {
}
}
// Should this be public or internal?
static enum CompactType {
DECIMAL,
CURRENCY
}
static class CompactDecimalFingerprint {
// TODO: Add more stuff to the fingerprint, like the symbols used by PNAffixGenerator
final CompactStyle compactStyle;

View File

@ -70,6 +70,26 @@ public class CompactDecimalFormat extends DecimalFormat {
LONG
}
/**
* Type parameter for CompactDecimalFormat.
*
* @draft ICU 60
*/
public enum CompactType {
/**
* Standard compact format, like "1.2T"
*
* @draft ICU 60
*/
DECIMAL,
/**
* Compact format with currency, like "$1.2T"
*
* @draft ICU 60
*/
CURRENCY
}
/**
* Creates a CompactDecimalFormat appropriate for a locale. The result may be affected by the
* number system in the locale, such as ar-u-nu-latn.