public class PluralsResourceValueImpl extends ResourceValueImpl implements PluralsResourceValue
mNamespaceResolver| Constructor and Description |
|---|
PluralsResourceValueImpl(ResourceNamespace namespace,
java.lang.String name,
java.lang.String value,
java.lang.String libraryName) |
PluralsResourceValueImpl(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 strings.
|
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
|
asReference, equals, getLibraryName, getName, getNamespace, getNamespaceResolver, getResourceType, hashCode, isFramework, isUserDefined, replaceWith, setNamespaceResolver, setValue, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitasReference, getLibraryName, getName, getNamespace, getNamespaceResolver, getRawXmlValue, getReference, getResourceType, getResourceUrl, isFramework, isUserDefined, setValuepublic PluralsResourceValueImpl(@NonNull
ResourceNamespace namespace,
@NonNull
java.lang.String name,
@Nullable
java.lang.String value,
@Nullable
java.lang.String libraryName)
public PluralsResourceValueImpl(@NonNull
ResourceReference reference,
@Nullable
java.lang.String value,
@Nullable
java.lang.String libraryName)
public void addPlural(@NonNull
java.lang.String quantity,
@NonNull
java.lang.String value)
public int getPluralsCount()
PluralsResourceValuegetPluralsCount in interface PluralsResourceValue@NonNull public java.lang.String getQuantity(int index)
PluralsResourceValuegetQuantity in interface PluralsResourceValueindex - the index, which must be in the range 0..getPluralsCount()-1.@NonNull public java.lang.String getValue(int index)
PluralsResourceValuegetValue in interface PluralsResourceValueindex - index, which must be in the range 0..getPluralsCount()-1.@Nullable
public java.lang.String getValue(@NonNull
java.lang.String quantity)
PluralsResourceValuegetValue in interface PluralsResourceValuequantity - the quantity string, such as "one", "two", "few", etc.@Nullable public java.lang.String getValue()
ResourceValueStyleResourceValue.getValue in interface ResourceValuegetValue in class ResourceValueImpl