|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.freecol.client.gui.i18n.NumberRules
public class NumberRules
See the Common Locale Data Repository.
| Field Summary | |
|---|---|
static Number |
DUAL_NUMBER_RULE
A rule that assigns 1 to category "one", 2 to category "two" and all other numbers to category "other". |
private static java.util.logging.Logger |
logger
|
private static java.util.Map<java.lang.String,Number> |
numberMap
|
static Number |
OTHER_NUMBER_RULE
A rule that always returns category "other". |
static Number |
PLURAL_NUMBER_RULE
A rule that assigns 1 to category "one" and all other numbers to category "other". |
static Number |
ZERO_ONE_NUMBER_RULE
A rule that assigns 0 and 1 to category "one", and all other number to category "other". |
| Constructor Summary | |
|---|---|
NumberRules(java.io.InputStream in)
Creates a new NumberRules instance from the given
input stream, which must contain an XML representation of the
CLDR plural rules. |
|
| Method Summary | |
|---|---|
static Number |
getNumberForLanguage(java.lang.String lang)
Returns a rule appropriate for the given language, or the OTHER_NUMBER_RULE if none has been defined. |
static boolean |
isInitialized()
Describe isInitialized method here. |
static void |
load(java.io.InputStream in)
Describe load method here. |
private static void |
readChild(javax.xml.stream.XMLStreamReader in)
Describe readChild method here. |
private static void |
readFromXML(javax.xml.stream.XMLStreamReader in)
Describe readFromXML method here. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final java.util.logging.Logger logger
public static final Number OTHER_NUMBER_RULE
public static final Number DUAL_NUMBER_RULE
public static final Number PLURAL_NUMBER_RULE
public static final Number ZERO_ONE_NUMBER_RULE
private static java.util.Map<java.lang.String,Number> numberMap
| Constructor Detail |
|---|
public NumberRules(java.io.InputStream in)
NumberRules instance from the given
input stream, which must contain an XML representation of the
CLDR plural rules.
in - an InputStream value| Method Detail |
|---|
public static Number getNumberForLanguage(java.lang.String lang)
lang - a String value
Number valuepublic static boolean isInitialized()
isInitialized method here.
boolean valuepublic static void load(java.io.InputStream in)
load method here.
in - an InputStream value
private static void readFromXML(javax.xml.stream.XMLStreamReader in)
throws javax.xml.stream.XMLStreamException
readFromXML method here.
in - a XMLStreamReader value
javax.xml.stream.XMLStreamException - if an error occurs
private static void readChild(javax.xml.stream.XMLStreamReader in)
throws javax.xml.stream.XMLStreamException
readChild method here.
in - a XMLStreamReader value
javax.xml.stream.XMLStreamException - if an error occurs
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||