| Method from org.dom4j.bean.BeanAttributeList Detail: |
public boolean add(Object object) {
throw new UnsupportedOperationException("add(Object) unsupported");
}
|
public void add(int index,
Object object) {
throw new UnsupportedOperationException("add(int,Object) unsupported");
}
|
public Attribute attribute(String name) {
int index = beanMetaData.getIndex(name);
return attribute(index);
}
|
public Attribute attribute(QName qname) {
int index = beanMetaData.getIndex(qname);
return attribute(index);
}
|
public BeanAttribute attribute(int index) {
if ((index >= 0) && (index < = attributes.length)) {
BeanAttribute attribute = attributes[index];
if (attribute == null) {
attribute = createAttribute(parent, index);
attributes[index] = attribute;
}
return attribute;
}
return null;
}
|
public void clear() {
for (int i = 0, size = attributes.length; i < size; i++) {
BeanAttribute attribute = attributes[i];
if (attribute != null) {
attribute.setValue(null);
}
}
}
|
protected BeanAttribute createAttribute(BeanElement element,
int index) {
return new BeanAttribute(this, index);
}
|
public Object get(int index) {
BeanAttribute attribute = attributes[index];
if (attribute == null) {
attribute = createAttribute(parent, index);
attributes[index] = attribute;
}
return attribute;
}
|
public Object getData(int index) {
return beanMetaData.getData(index, parent.getData());
}
|
public BeanElement getParent() {
return parent;
}
|
public QName getQName(int index) {
return beanMetaData.getQName(index);
}
|
public boolean remove(Object object) {
return false;
}
|
public Object remove(int index) {
BeanAttribute attribute = (BeanAttribute) get(index);
Object oldValue = attribute.getValue();
attribute.setValue(null);
return oldValue;
}
|
public Object set(int index,
Object object) {
throw new UnsupportedOperationException("set(int,Object) unsupported");
}
|
public void setData(int index,
Object data) {
beanMetaData.setData(index, parent.getData(), data);
}
|
public int size() {
return attributes.length;
}
|