Top Description Fields Constructors Methods
org.dom4j.bean

public Class BeanAttributeList

extends AbstractList<Attribute>
Class Inheritance
Imports
java.util.AbstractList, org.dom4j.Attribute, .QName

BeanAttributeList implements a list of Attributes which are the properties of a JavaBean.

Author
James Strachan
Version
$Revision: 1.9 $

Field Summary

Modifier and TypeField and Description
private BeanAttribute[]
attributes

The attributes

private BeanMetaData
beanMetaData

The BeanElement that this

private BeanElement
parent

The BeanElement that this

Inherited from java.util.AbstractList:
modCount

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public boolean
add(BeanAttribute
element to be appended to this list
object
)

Overrides java.util.AbstractList.add.

Implements java.util.List.add, java.util.Collection.add.

Appends the specified element to the end of this list (optional operation).
public void
add(int
index at which the specified element is to be inserted
index
,
BeanAttribute
element to be inserted
object
)

Overrides java.util.AbstractList.add.

Implements java.util.List.add.

Inserts the specified element at the specified position in this list (optional operation).
public BeanAttribute
public BeanAttribute
public BeanAttribute
attribute(int index)

public void
clear()

Overrides java.util.AbstractList.clear.

Implements java.util.List.clear, java.util.Collection.clear.

Removes all of the elements from this list (optional operation).
protected BeanAttribute
createAttribute(BeanElement element, int index)

public BeanAttribute
get(int
index of the element to return
index
)

Implements abstract java.util.AbstractList.get.

Implements java.util.List.get.

Returns the element at the specified position in this list.
public Object
getData(int index)

public BeanElement
public QName
getQName(int index)

public boolean
remove(Object
element to be removed from this list, if present
object
)

Overrides java.util.AbstractCollection.remove.

Implements java.util.List.remove, java.util.Collection.remove.

Removes the first occurrence of the specified element from this list, if it is present (optional operation).
public BeanAttribute
remove(int
the index of the element to be removed
index
)

Overrides java.util.AbstractList.remove.

Implements java.util.List.remove.

Removes the element at the specified position in this list (optional operation).
public BeanAttribute
set(int
index of the element to replace
index
,
BeanAttribute
element to be stored at the specified position
object
)

Overrides java.util.AbstractList.set.

Implements java.util.List.set.

Replaces the element at the specified position in this list with the specified element (optional operation).
public void
setData(int index, Object data)

public int
size()

Implements abstract java.util.AbstractCollection.size.

Implements java.util.List.size, java.util.Collection.size.

Returns the number of elements in this list.
Inherited from java.util.AbstractList:
addAllequalshashCodeindexOfiteratorlastIndexOflistIteratorlistIteratorremoveRangesubList

Field Detail

attributesback to summary
private BeanAttribute[] attributes

The attributes

beanMetaDataback to summary
private BeanMetaData beanMetaData

The BeanElement that this

parentback to summary
private BeanElement parent

The BeanElement that this

Constructor Detail

BeanAttributeListback to summary
public BeanAttributeList(BeanElement parent, BeanMetaData beanMetaData)
BeanAttributeListback to summary
public BeanAttributeList(BeanElement parent)

Method Detail

addback to summary
public boolean add(BeanAttribute object)

Overrides java.util.AbstractList.add.

Implements java.util.List.add, java.util.Collection.add.

Doc from java.util.AbstractList.add.

Appends the specified element to the end of this list (optional operation).

Lists that support this operation may place limitations on what elements may be added to this list. In particular, some lists will refuse to add null elements, and others will impose restrictions on the type of elements that may be added. List classes should clearly specify in their documentation any restrictions on what elements may be added.

Parameters
object:BeanAttribute

element to be appended to this list

Returns:boolean

true (as specified by Collection#add)

addback to summary
public void add(int index, BeanAttribute object)

Overrides java.util.AbstractList.add.

Implements java.util.List.add.

Doc from java.util.AbstractList.add.

Inserts the specified element at the specified position in this list (optional operation). Shifts the element currently at that position (if any) and any subsequent elements to the right (adds one to their indices).

Parameters
index:int

Doc from java.util.List.add.

index at which the specified element is to be inserted

object:BeanAttribute

Doc from java.util.List.add.

element to be inserted

attributeback to summary
public BeanAttribute attribute(String name)
attributeback to summary
public BeanAttribute attribute(QName qname)
attributeback to summary
public BeanAttribute attribute(int index)
clearback to summary
public void clear()

Overrides java.util.AbstractList.clear.

Implements java.util.List.clear, java.util.Collection.clear.

Doc from java.util.AbstractList.clear.

Removes all of the elements from this list (optional operation). The list will be empty after this call returns.

createAttributeback to summary
protected BeanAttribute createAttribute(BeanElement element, int index)
getback to summary
public BeanAttribute get(int index)

Implements abstract java.util.AbstractList.get.

Implements java.util.List.get.

Doc from java.util.AbstractList.get.

Returns the element at the specified position in this list.

Parameters
index:int

Doc from java.util.List.get.

index of the element to return

Returns:BeanAttribute

Doc from java.util.List.get.

the element at the specified position in this list

getDataback to summary
public Object getData(int index)
getParentback to summary
public BeanElement getParent()
getQNameback to summary
public QName getQName(int index)
removeback to summary
public boolean remove(Object object)

Overrides java.util.AbstractCollection.remove.

Implements java.util.List.remove, java.util.Collection.remove.

Doc from java.util.List.remove.

Removes the first occurrence of the specified element from this list, if it is present (optional operation). If this list does not contain the element, it is unchanged. More formally, removes the element with the lowest index i such that Objects.equals(o, get(i)) (if such an element exists). Returns true if this list contained the specified element (or equivalently, if this list changed as a result of the call).

Parameters
object:Object

element to be removed from this list, if present

Returns:boolean

true if this list contained the specified element

removeback to summary
public BeanAttribute remove(int index)

Overrides java.util.AbstractList.remove.

Implements java.util.List.remove.

Doc from java.util.AbstractList.remove.

Removes the element at the specified position in this list (optional operation). Shifts any subsequent elements to the left (subtracts one from their indices). Returns the element that was removed from the list.

Parameters
index:int

Doc from java.util.List.remove.

the index of the element to be removed

Returns:BeanAttribute

Doc from java.util.List.remove.

the element previously at the specified position

setback to summary
public BeanAttribute set(int index, BeanAttribute object)

Overrides java.util.AbstractList.set.

Implements java.util.List.set.

Doc from java.util.AbstractList.set.

Replaces the element at the specified position in this list with the specified element (optional operation).

Parameters
index:int

Doc from java.util.List.set.

index of the element to replace

object:BeanAttribute

Doc from java.util.List.set.

element to be stored at the specified position

Returns:BeanAttribute

Doc from java.util.List.set.

the element previously at the specified position

setDataback to summary
public void setData(int index, Object data)
sizeback to summary
public int size()

Implements abstract java.util.AbstractCollection.size.

Implements java.util.List.size, java.util.Collection.size.

Doc from java.util.List.size.

Returns the number of elements in this list. If this list contains more than Integer.MAX_VALUE elements, returns Integer.MAX_VALUE.

Returns:int

the number of elements in this list

Annotations
@Override