public class ArrayResourceValueImpl extends ResourceValueImpl implements ArrayResourceValue
ResourceValue
items, one for array element.mNamespaceResolver| Constructor and Description |
|---|
ArrayResourceValueImpl(ResourceNamespace namespace,
ResourceType type,
java.lang.String name,
java.lang.String libraryName) |
ArrayResourceValueImpl(ResourceReference reference,
java.lang.String libraryName) |
| Modifier and Type | Method and Description |
|---|---|
void |
addElement(java.lang.String value)
Adds an element into the array.
|
protected int |
getDefaultIndex()
Returns the index of the element to pick by default if a client of layoutlib asks for the
getValue() rather than the more specific ArrayResourceValue iteration
methods |
java.lang.String |
getElement(int index)
Returns the array element value at the given index position.
|
int |
getElementCount()
Returns the number of elements in this array.
|
java.lang.String |
getValue()
Returns the value of the resource, as defined in the XML.
|
java.util.Iterator<java.lang.String> |
iterator() |
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, setNamespaceResolver, setValuepublic ArrayResourceValueImpl(@NonNull
ResourceNamespace namespace,
@NonNull
ResourceType type,
@NonNull
java.lang.String name,
@Nullable
java.lang.String libraryName)
public ArrayResourceValueImpl(@NonNull
ResourceReference reference,
@Nullable
java.lang.String libraryName)
public int getElementCount()
ArrayResourceValuegetElementCount in interface ArrayResourceValue@NonNull public java.lang.String getElement(int index)
ArrayResourceValuegetElement in interface ArrayResourceValueindex - index, which must be in the range [0..getElementCount()].public void addElement(@NonNull
java.lang.String value)
public java.util.Iterator<java.lang.String> iterator()
iterator in interface java.lang.Iterable<java.lang.String>protected int getDefaultIndex()
getValue() rather than the more specific ArrayResourceValue iteration
methods@Nullable public java.lang.String getValue()
ResourceValueStyleResourceValue.getValue in interface ResourceValuegetValue in class ResourceValueImpl