public class PluralsResourceValue extends ResourceValue
mNamespaceResolver, mValue| Constructor and Description |
|---|
PluralsResourceValue(ResourceReference reference,
java.lang.String value,
java.lang.String libraryName) |
| Modifier and Type | Method and Description |
|---|---|
void |
addPlural(java.lang.String quantity,
java.lang.String value)
Adds an element into the array
|
int |
getPluralsCount()
Returns the number of plural string
|
java.lang.String |
getQuantity(int index)
Returns the quantity at the given index, such as "one", "two", "few", etc.
|
java.lang.String |
getValue()
Returns the value of the resource, as defined in the XML.
|
java.lang.String |
getValue(int index)
Returns the string element at the given index position.
|
java.lang.String |
getValue(java.lang.String quantity)
Returns the string element for the given quantity
|
equals, getLibraryName, getRawXmlValue, getReference, hashCode, isUserDefined, replaceWith, setNamespaceLookup, setValue, toStringgetName, getNamespace, getRelativeResourceUrl, getResourceType, getResourceUrl, isFrameworkpublic PluralsResourceValue(@NonNull
ResourceReference reference,
@Nullable
java.lang.String value,
@Nullable
java.lang.String libraryName)
public void addPlural(java.lang.String quantity,
java.lang.String value)
public int getPluralsCount()
public java.lang.String getQuantity(int index)
index - the index, which must be in the range [0..getPluralsCount()].public java.lang.String getValue(int index)
index - index, which must be in the range [0..getPluralsCount()].public java.lang.String getValue(java.lang.String quantity)
quantity - the quantity string, such as "one", "two", "few", etc.public java.lang.String getValue()
ResourceValuenull,
for example for instances of StyleResourceValue.getValue in class ResourceValue