UnlocalizedNumberRangeFormatter and LocalizedNumberRangeFormatter. This class is not intended for
public subclassing.
NumberRangeFormatter
| Modifier and Type | Field and Description |
|---|---|
| private final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| private final NumberRangeFormatterSettings | |
| private volatile RangeMacroProps | |
| private final Object |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public T | Returns: The fluent chain.The collapsing strategy to use for this range. collapseSets the aggressiveness of "collapsing" fields across the range separator. |
| pack-priv abstract T | |
| public boolean | equals(Object
the reference object with which to compare. other)Overrides java. |
| public int | |
| public T | Returns: The fluent chain.The strategy to use when formatting two numbers that end up being the same. identityFallbackSets the behavior when the two sides of the range are the same. |
| public T | Returns: The fluent chain.The formatter to use for both numbers in the range. formatter)Sets the NumberFormatter instance to use for the numbers in the range. |
| public T | Returns: The fluent chain.The formatter to use for the first number in the range. formatterFirst)Sets the NumberFormatter instance to use for the first number in the range. |
| public T | Returns: The fluent chain.The formatter to use for the second number in the range. formatterSecond)Sets the NumberFormatter instances to use for the second number in the range. |
| pack-priv RangeMacroProps |
| key | back to summary |
|---|---|
| private final int key | |
| KEY_COLLAPSE | back to summary |
|---|---|
| pack-priv static final int KEY_COLLAPSE | |
| KEY_FORMATTER_1 | back to summary |
|---|---|
| pack-priv static final int KEY_FORMATTER_1 | |
| KEY_FORMATTER_2 | back to summary |
|---|---|
| pack-priv static final int KEY_FORMATTER_2 | |
| KEY_IDENTITY_FALLBACK | back to summary |
|---|---|
| pack-priv static final int KEY_IDENTITY_FALLBACK | |
| KEY_LOCALE | back to summary |
|---|---|
| pack-priv static final int KEY_LOCALE | |
| KEY_MACROS | back to summary |
|---|---|
| pack-priv static final int KEY_MACROS | |
| KEY_MAX | back to summary |
|---|---|
| pack-priv static final int KEY_MAX | |
| KEY_SAME_FORMATTERS | back to summary |
|---|---|
| pack-priv static final int KEY_SAME_FORMATTERS | |
| parent | back to summary |
|---|---|
| private final NumberRangeFormatterSettings<?> parent | |
| resolvedMacros | back to summary |
|---|---|
| private volatile RangeMacroProps resolvedMacros | |
| value | back to summary |
|---|---|
| private final Object value | |
| NumberRangeFormatterSettings | back to summary |
|---|---|
| pack-priv NumberRangeFormatterSettings(NumberRangeFormatterSettings<?> parent, int key, Object value) | |
| collapse | back to summary |
|---|---|
| public T collapse(NumberRangeFormatter. Sets the aggressiveness of "collapsing" fields across the range separator. Possible values:
The default value is AUTO.
| |
| create | back to summary |
|---|---|
| pack-priv abstract T create(int key, Object value) | |
| equals | back to summary |
|---|---|
| public boolean equals(Object other) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| identityFallback | back to summary |
|---|---|
| public T identityFallback(NumberRangeFormatter. Sets the behavior when the two sides of the range are the same. This could happen if the same two numbers are passed to the formatRange function, or if different numbers are passed to the function but they become the same after rounding rules are applied. Possible values:
The default value is APPROXIMATELY.
| |
| numberFormatterBoth | back to summary |
|---|---|
| public T numberFormatterBoth(UnlocalizedNumberFormatter formatter) Sets the NumberFormatter instance to use for the numbers in the range. The same formatter is applied to both sides of the range. The NumberFormatter instances must not have a locale applied yet; the locale specified on the NumberRangeFormatter will be used.
| |
| numberFormatterFirst | back to summary |
|---|---|
| public T numberFormatterFirst(UnlocalizedNumberFormatter formatterFirst) Sets the NumberFormatter instance to use for the first number in the range. The NumberFormatter instance must not have a locale applied yet; the locale specified on the NumberRangeFormatter will be used.
| |
| numberFormatterSecond | back to summary |
|---|---|
| public T numberFormatterSecond(UnlocalizedNumberFormatter formatterSecond) Sets the NumberFormatter instances to use for the second number in the range. The NumberFormatter instance must not have a locale applied yet; the locale specified on the NumberRangeFormatter will be used.
| |
| resolve | back to summary |
|---|---|
| pack-priv RangeMacroProps resolve() | |