Package com.transifex.common
Class Plurals
java.lang.Object
com.transifex.common.Plurals
An object representation of Android's
plurals.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A class for building aPlurals
object.static class
static class
static @interface
A tag that represents the plural type. -
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Plurals
fromICUString
(String icuString) Parses the provided ICU string and creates a new Plurals object.Returns the plural string for the provided plural type.Returns the object as a string in ICU format.toString()
-
Field Details
-
zero
-
one
-
two
-
few
-
many
-
other
-
-
Constructor Details
-
Method Details
-
getPlural
Returns the plural string for the provided plural type.- Parameters:
pluralType
- The plural type of the string.- Returns:
- The plural string for the provided plural type; the value will be
null
if no string exists for the provided plural
-
toICUString
Returns the object as a string in ICU format. -
fromICUString
Parses the provided ICU string and creates a new Plurals object.- Parameters:
icuString
- The ICU string to parse.- Returns:
- Returns a
Plurals
object if parsing was successful;null
otherwise
-
toString
-