Top Description Inners Fields Constructors Methods
com.ibm.icu.number

pack-priv Class NumberRangeFormatterImpl

extends Object
Class Inheritance
Imports
java.util.MissingResourceException, com.ibm.icu.impl.FormattedStringBuilder, .FormattedValueStringBuilderImpl, .ICUData, .ICUResourceBundle, .PatternProps, .SimpleFormatterImpl, .StandardPlural, .UResource, com.ibm.icu.impl.number.DecimalQuantity, .MacroProps, .MicroProps, .Modifier, .SimpleModifier, com.ibm.icu.impl.number.range.PrefixInfixSuffixLengthHelper, .RangeMacroProps, .StandardPluralRanges, com.ibm.icu.number.NumberRangeFormatter.RangeCollapse, .NumberRangeFormatter.RangeIdentityFallback, .NumberRangeFormatter.RangeIdentityResult, com.ibm.icu.text.NumberFormat, com.ibm.icu.util.ULocale, .UResourceBundle

Business logic behind NumberRangeFormatter.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
pack-priv final NumberFormatterImpl
pack-priv final NumberRangeFormatter.RangeCollapse
pack-priv final NumberRangeFormatter.RangeIdentityFallback
pack-priv final NumberFormatterImpl
pack-priv final NumberFormatterImpl
pack-priv final StandardPluralRanges
pack-priv String
pack-priv final boolean

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public FormattedNumberRange
format(DecimalQuantity quantity1, DecimalQuantity quantity2, boolean equalBeforeRounding)

Deprecated as a consequence of DecimalQuantity being deprecated.
private void
formatApproximately(DecimalQuantity quantity1, DecimalQuantity quantity2, FormattedStringBuilder string, MicroProps micros1, MicroProps micros2)

Deprecated as a consequence of DecimalQuantity being deprecated.
private void
formatRange(DecimalQuantity quantity1, DecimalQuantity quantity2, FormattedStringBuilder string, MicroProps micros1, MicroProps micros2)

Deprecated as a consequence of DecimalQuantity being deprecated.
private void
formatSingleValue(DecimalQuantity quantity1, DecimalQuantity quantity2, FormattedStringBuilder string, MicroProps micros1, MicroProps micros2)

Deprecated as a consequence of DecimalQuantity being deprecated.
private static void
pack-priv int
pack-priv Modifier
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

fApproximatelyFormatterback to summary
pack-priv final NumberFormatterImpl fApproximatelyFormatter
fCollapseback to summary
pack-priv final NumberRangeFormatter.RangeCollapse fCollapse
fIdentityFallbackback to summary
pack-priv final NumberRangeFormatter.RangeIdentityFallback fIdentityFallback
formatterImpl1back to summary
pack-priv final NumberFormatterImpl formatterImpl1
formatterImpl2back to summary
pack-priv final NumberFormatterImpl formatterImpl2
fPluralRangesback to summary
pack-priv final StandardPluralRanges fPluralRanges
fRangePatternback to summary
pack-priv String fRangePattern
fSameFormattersback to summary
pack-priv final boolean fSameFormatters

Constructor Detail

NumberRangeFormatterImplback to summary
public NumberRangeFormatterImpl(RangeMacroProps macros)

Method Detail

formatback to summary
public FormattedNumberRange format(DecimalQuantity quantity1, DecimalQuantity quantity2, boolean equalBeforeRounding)

Deprecated

as a consequence of DecimalQuantity being deprecated. See corresponding docs for further information.

formatApproximatelyback to summary
private void formatApproximately(DecimalQuantity quantity1, DecimalQuantity quantity2, FormattedStringBuilder string, MicroProps micros1, MicroProps micros2)

Deprecated

as a consequence of DecimalQuantity being deprecated. See corresponding docs for further information.

formatRangeback to summary
private void formatRange(DecimalQuantity quantity1, DecimalQuantity quantity2, FormattedStringBuilder string, MicroProps micros1, MicroProps micros2)

Deprecated

as a consequence of DecimalQuantity being deprecated. See corresponding docs for further information.

formatSingleValueback to summary
private void formatSingleValue(DecimalQuantity quantity1, DecimalQuantity quantity2, FormattedStringBuilder string, MicroProps micros1, MicroProps micros2)

Deprecated

as a consequence of DecimalQuantity being deprecated. See corresponding docs for further information.

getNumberRangeDataback to summary
private static void getNumberRangeData(ULocale locale, String nsName, NumberRangeFormatterImpl out)
identity2dback to summary
pack-priv int identity2d(NumberRangeFormatter.RangeIdentityFallback a, NumberRangeFormatter.RangeIdentityResult b)
resolveModifierPluralsback to summary
pack-priv Modifier resolveModifierPlurals(Modifier first, Modifier second)
com.ibm.icu.number back to summary

private final Class NumberRangeFormatterImpl.NumberRangeDataSink

extends Sink
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv String
pack-priv StringBuilder

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
private boolean
public boolean
public void
put(UResource.Key
Initially the key string of the enumeration-start resource. Empty if the enumeration starts at the top level of the bundle. Reuse for output values from Array and Table getters.
key
,
UResource.Value
Call getArray() or getTable() as appropriate. Then reuse for output values from Array and Table getters.
value
,
boolean
true if the bundle has no parent; that is, its top-level table has the nofallback attribute, or it is the root bundle of a locale tree.
noFallback
)

Implements abstract com.ibm.icu.impl.UResource.Sink.put.

Called once for each bundle (child-parent-...-root).

Field Detail

rangePatternback to summary
pack-priv String rangePattern
sbback to summary
pack-priv StringBuilder sb

Constructor Detail

NumberRangeDataSinkback to summary
pack-priv NumberRangeDataSink(StringBuilder sb)

Method Detail

fillInDefaultsback to summary
public void fillInDefaults()
hasRangeDataback to summary
private boolean hasRangeData()
isCompleteback to summary
public boolean isComplete()
putback to summary
public void put(UResource.Key key, UResource.Value value, boolean noFallback)

Implements abstract com.ibm.icu.impl.UResource.Sink.put.

Doc from com.ibm.icu.impl.UResource.Sink.put.

Called once for each bundle (child-parent-...-root). The value is normally an array or table resource, and implementations of this method normally iterate over the tree of resource items stored there.

Parameters
key:UResource.Key

Initially the key string of the enumeration-start resource. Empty if the enumeration starts at the top level of the bundle. Reuse for output values from Array and Table getters.

value:UResource.Value

Call getArray() or getTable() as appropriate. Then reuse for output values from Array and Table getters.

noFallback:boolean

true if the bundle has no parent; that is, its top-level table has the nofallback attribute, or it is the root bundle of a locale tree.

Annotations
@Override