public class ArrayResourceValue extends ResourceValue implements java.lang.Iterable<java.lang.String>
ResourceValue
items, one for array element.mValue
Constructor and Description |
---|
ArrayResourceValue(java.lang.String name,
boolean isFramework) |
ArrayResourceValue(java.lang.String name,
boolean isFramework,
java.lang.String libraryName)
Constructs a new ArrayResourceValue
|
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()
Returns an iterator over the resource values
|
equals, getLibraryName, getRawXmlValue, getResourceType, hashCode, isUserDefined, replaceWith, setValue, toString
getName, isFramework
public ArrayResourceValue(java.lang.String name, boolean isFramework)
public ArrayResourceValue(java.lang.String name, boolean isFramework, java.lang.String libraryName)
name
- the name of the arrayisFramework
- whether this is a framework resourcelibraryName
- the name of the library where the resource was foundpublic void addElement(java.lang.String value)
public int getElementCount()
public java.lang.String getElement(int index)
index
- index, which must be in the range [0..getElementCount()].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 methodspublic java.lang.String getValue()
ResourceValue
null
,
for example for instances of StyleResourceValue
.getValue
in class ResourceValue