public class AttributeSetImpl extends Object implements AttributeSet
| Modifier and Type | Field and Description |
|---|---|
static String |
XMLNS
The XML namespace declaration prefix.
|
| Constructor and Description |
|---|
AttributeSetImpl()
Creates a new AttributeSetImpl.
|
AttributeSetImpl(int size)
Creates a new AttributeSetImpl.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Removes all Attributes in this AttributeSetImpl
|
int |
getIndex(String name,
String namespace)
Returns the index of the attribute associated with the given name and namespace.
|
String |
getName(int index)
Returns the name of the attribute located at the given index.
|
String |
getNamespace(int index)
Returns the namespace of the attribute located at the given index.
|
int |
getSize()
Returns the number of Attributes within this AttributeSet.
|
String |
getValue(int index)
Returns the value of the attribute located at the given index within this AttributeSet.
|
String |
getValue(String name)
Returns the value of the attribute associated with the given name.
|
String |
getValue(String name,
String namespace)
Returns the value of the attribute associated with the given name.
|
void |
setAttribute(String name,
String value)
Adds or replaces the attribute with the given name.
|
void |
setAttribute(String name,
String value,
String namespace)
Adds or replaces the attribute with the given name.
|
public static final String XMLNS
public AttributeSetImpl()
public AttributeSetImpl(int size)
size - the default size for this AttributeSetImplpublic void clear()
public int getIndex(String name, String namespace)
getIndex in interface AttributeSetname - the name of the attribute whose value should be returned.namespace - the namespace of the attributepublic String getName(int index)
getName in interface AttributeSetindex - the index of the attribute whose name should be returned.public String getNamespace(int index)
getNamespace in interface AttributeSetpublic int getSize()
getSize in interface AttributeSetpublic String getValue(int index)
getValue in interface AttributeSetindex - the index of the attribute whose value should be returned.public String getValue(String name)
getValue in interface AttributeSetname - the name of the attribute whose value should be returned.public String getValue(String name, String namespace)
getValue in interface AttributeSetname - the name of the attribute whose value should be returned.namespace - the namespace of the attributepublic void setAttribute(String name, String value)
name - the name of the attributevalue - the attribute value.Copyright © 2016. All rights reserved.