Top Inners Fields Constructors Methods
com.ibm.icu.impl.number.range

public Class StandardPluralRanges

extends Object
Class Inheritance
Imports
java.util.Collections, .HashMap, .Map, com.ibm.icu.impl.ICUData, .ICUResourceBundle, .StandardPlural, .UResource, com.ibm.icu.util.ULocale, .UResourceBundle, .UResourceTypeMismatchException

Author
sffc

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private static class

Field Summary

Modifier and TypeField and Description
public static final StandardPluralRanges
DEFAULT

An empty StandardPluralRanges instance.

pack-priv StandardPlural[]
private static volatile Map<String, String>
languageToSet

An immutable map from language codes to set IDs.

pack-priv int

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private void
addPluralRange(StandardPlural first, StandardPlural second, StandardPlural result)

Used for data loading.

public static StandardPluralRanges
forLocale(ULocale locale)

Create a StandardPluralRanges based on locale.

public static StandardPluralRanges
forSet(String set)

Create a StandardPluralRanges based on set name.

private static Map<String, String>
private static void
public static String
getSetForLocale(ULocale locale)

Get the set name from the locale.

public StandardPlural
private void
setCapacity(int length)

Used for data loading.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DEFAULTback to summary
public static final StandardPluralRanges DEFAULT

An empty StandardPluralRanges instance.

flatTriplesback to summary
pack-priv StandardPlural[] flatTriples
languageToSetback to summary
private static volatile Map<String, String> languageToSet

An immutable map from language codes to set IDs. Pre-computed and cached in Java since it is used as a cache key for PluralRules.

numTriplesback to summary
pack-priv int numTriples

Constructor Detail

StandardPluralRangesback to summary
private StandardPluralRanges()

Method Detail

addPluralRangeback to summary
private void addPluralRange(StandardPlural first, StandardPlural second, StandardPlural result)

Used for data loading.

forLocaleback to summary
public static StandardPluralRanges forLocale(ULocale locale)

Create a StandardPluralRanges based on locale.

forSetback to summary
public static StandardPluralRanges forSet(String set)

Create a StandardPluralRanges based on set name.

getLanguageToSetback to summary
private static Map<String, String> getLanguageToSet()
getPluralRangesDataback to summary
private static void getPluralRangesData(String set, StandardPluralRanges out)
getSetForLocaleback to summary
public static String getSetForLocale(ULocale locale)

Get the set name from the locale.

resolveback to summary
public StandardPlural resolve(StandardPlural first, StandardPlural second)
setCapacityback to summary
private void setCapacity(int length)

Used for data loading.

com.ibm.icu.impl.number.range back to summary

private final Class StandardPluralRanges.PluralRangesDataSink

extends Sink
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv StandardPluralRanges

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
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

outputback to summary
pack-priv StandardPluralRanges output

Constructor Detail

PluralRangesDataSinkback to summary
pack-priv PluralRangesDataSink(StandardPluralRanges output)

Method Detail

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
com.ibm.icu.impl.number.range back to summary

private final Class StandardPluralRanges.PluralRangeSetsDataSink

extends Sink
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv Map<String, String>

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
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

outputback to summary
pack-priv Map<String, String> output

Constructor Detail

PluralRangeSetsDataSinkback to summary
pack-priv PluralRangeSetsDataSink(Map<String, String> output)

Method Detail

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