Package com.ibm.icu.impl.number
Class AdoptingModifierStore
- java.lang.Object
-
- com.ibm.icu.impl.number.AdoptingModifierStore
-
- All Implemented Interfaces:
ModifierStore
public class AdoptingModifierStore extends java.lang.Object implements ModifierStore
This implementation of ModifierStore adopts references to Modifiers. (This is named "adopting" because in C++, this class takes ownership of the Modifiers.)
-
-
Constructor Summary
Constructors Constructor Description AdoptingModifierStore()
This constructor prepares the ParameterizedModifier to be populated with a positive and negative Modifier for multiple plural forms.AdoptingModifierStore(Modifier positive, Modifier posZero, Modifier negZero, Modifier negative)
This constructor populates the ParameterizedModifier with a single positive and negative form.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
freeze()
Modifier
getModifier(Modifier.Signum signum, StandardPlural plural)
Returns a Modifier with the given parameters (best-effort).Modifier
getModifierWithoutPlural(Modifier.Signum signum)
private static int
getModIndex(Modifier.Signum signum, StandardPlural plural)
void
setModifier(Modifier.Signum signum, StandardPlural plural, Modifier mod)
-
-
-
Constructor Detail
-
AdoptingModifierStore
public AdoptingModifierStore(Modifier positive, Modifier posZero, Modifier negZero, Modifier negative)
This constructor populates the ParameterizedModifier with a single positive and negative form.If this constructor is used, a plural form CANNOT be passed to
getModifier(com.ibm.icu.impl.number.Modifier.Signum, com.ibm.icu.impl.StandardPlural)
.
-
AdoptingModifierStore
public AdoptingModifierStore()
This constructor prepares the ParameterizedModifier to be populated with a positive and negative Modifier for multiple plural forms.If this constructor is used, a plural form MUST be passed to
getModifier(com.ibm.icu.impl.number.Modifier.Signum, com.ibm.icu.impl.StandardPlural)
.
-
-
Method Detail
-
setModifier
public void setModifier(Modifier.Signum signum, StandardPlural plural, Modifier mod)
-
freeze
public void freeze()
-
getModifierWithoutPlural
public Modifier getModifierWithoutPlural(Modifier.Signum signum)
-
getModifier
public Modifier getModifier(Modifier.Signum signum, StandardPlural plural)
Description copied from interface:ModifierStore
Returns a Modifier with the given parameters (best-effort).- Specified by:
getModifier
in interfaceModifierStore
-
getModIndex
private static int getModIndex(Modifier.Signum signum, StandardPlural plural)
-
-