Package com.transifex.common
Class Plurals
java.lang.Object
com.transifex.common.Plurals
An object representation of Android's
plurals.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA class for building aPluralsobject.static classstatic classstatic @interfaceA tag that represents the plural type. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PluralsfromICUString(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
nullif 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
Pluralsobject if parsing was successful;nullotherwise
-
toString
-