Package com.ibm.icu.impl.number
Class Grouper
- java.lang.Object
-
- com.ibm.icu.impl.number.Grouper
-
public class Grouper extends java.lang.Object
A full options object for grouping sizes.
-
-
Field Summary
Fields Modifier and Type Field Description private static Grouper
GROUPER_AUTO
private static Grouper
GROUPER_INDIC
private static Grouper
GROUPER_INDIC_MIN2
private static Grouper
GROUPER_MIN2
private static Grouper
GROUPER_NEVER
private static Grouper
GROUPER_ON_ALIGNED
private static Grouper
GROUPER_WESTERN
private static Grouper
GROUPER_WESTERN_MIN2
private short
grouping1
The primary grouping size, with the following special values: -1 = no grouping -2 = needs locale data -4 = fall back to Western grouping if not in localeprivate short
grouping2
The secondary grouping size, with the following special values: -1 = no grouping -2 = needs locale data -4 = fall back to Western grouping if not in localeprivate short
minGrouping
The minimum grouping size, with the following special values: -2 = needs locale data -3 = no less than 2
-
Constructor Summary
Constructors Modifier Constructor Description private
Grouper(short grouping1, short grouping2, short minGrouping)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Grouper
forProperties(DecimalFormatProperties properties)
Resolve the values in Properties to a Grouper object.static Grouper
forStrategy(NumberFormatter.GroupingStrategy grouping)
Convert from the GroupingStrategy enum to a Grouper object.static Grouper
getInstance(short grouping1, short grouping2, short minGrouping)
private static short
getMinGroupingForLocale(ULocale locale)
short
getPrimary()
short
getSecondary()
boolean
groupAtPosition(int position, DecimalQuantity value)
Grouper
withLocaleData(ULocale locale, PatternStringParser.ParsedPatternInfo patternInfo)
-
-
-
Field Detail
-
GROUPER_NEVER
private static final Grouper GROUPER_NEVER
-
GROUPER_MIN2
private static final Grouper GROUPER_MIN2
-
GROUPER_AUTO
private static final Grouper GROUPER_AUTO
-
GROUPER_ON_ALIGNED
private static final Grouper GROUPER_ON_ALIGNED
-
GROUPER_WESTERN
private static final Grouper GROUPER_WESTERN
-
GROUPER_INDIC
private static final Grouper GROUPER_INDIC
-
GROUPER_WESTERN_MIN2
private static final Grouper GROUPER_WESTERN_MIN2
-
GROUPER_INDIC_MIN2
private static final Grouper GROUPER_INDIC_MIN2
-
grouping1
private final short grouping1
The primary grouping size, with the following special values:- -1 = no grouping
- -2 = needs locale data
- -4 = fall back to Western grouping if not in locale
-
grouping2
private final short grouping2
The secondary grouping size, with the following special values:- -1 = no grouping
- -2 = needs locale data
- -4 = fall back to Western grouping if not in locale
-
minGrouping
private final short minGrouping
The minimum grouping size, with the following special values:- -2 = needs locale data
- -3 = no less than 2
-
-
Method Detail
-
forStrategy
public static Grouper forStrategy(NumberFormatter.GroupingStrategy grouping)
Convert from the GroupingStrategy enum to a Grouper object.
-
forProperties
public static Grouper forProperties(DecimalFormatProperties properties)
Resolve the values in Properties to a Grouper object.
-
getInstance
public static Grouper getInstance(short grouping1, short grouping2, short minGrouping)
-
getMinGroupingForLocale
private static short getMinGroupingForLocale(ULocale locale)
-
withLocaleData
public Grouper withLocaleData(ULocale locale, PatternStringParser.ParsedPatternInfo patternInfo)
-
groupAtPosition
public boolean groupAtPosition(int position, DecimalQuantity value)
-
getPrimary
public short getPrimary()
-
getSecondary
public short getSecondary()
-
-