ElementType - type of elements added to the listpublic class XMLObjectChildrenList<ElementType extends XMLObject> extends AbstractList<ElementType>
modCount| コンストラクタと説明 |
|---|
XMLObjectChildrenList(XMLObject newParent)
Constructs an empty list with all added XMLObjects being assigned the given parent XMLObject.
|
XMLObjectChildrenList(XMLObject newParent,
Collection<ElementType> newElements)
Constructs a list containing the elements in the specified collection, in the order they are returned by the
collection's iterator, with each added XMLObject assigned the given parent XMLObject.
|
| 修飾子とタイプ | メソッドと説明 |
|---|---|
void |
add(int index,
ElementType element)
Adds the given XMLObject to this list.
|
boolean |
contains(ElementType element)
Checks to see if the given element is contained in this list.
|
ElementType |
get(int index) |
boolean |
remove(ElementType element)
Removes the element from the list.
|
ElementType |
remove(int index) |
ElementType |
set(int index,
ElementType element)
Replaces the XMLObject at the specified index with the given element.
|
protected void |
setParent(ElementType element)
Assigned the parent, given at list construction, to the given element if the element does not have a parent or
its parent matches the one given at list construction time.
|
int |
size() |
add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, subListpublic XMLObjectChildrenList(XMLObject newParent) throws NullPointerException
newParent - the parent for all the added XMLObjectsNullPointerException - thrown if the parent is nullpublic XMLObjectChildrenList(XMLObject newParent, Collection<ElementType> newElements) throws NullPointerException
newParent - the parent for all the added XMLObjectsnewElements - the elements to be addedNullPointerException - thrown if the parent is nullIllegalArgumentException - thrown if any of the XMLObjects in the given collection already have a parent
that is different from the given parentpublic int size()
size インタフェース内 Collection<ElementType extends XMLObject>size インタフェース内 List<ElementType extends XMLObject>size クラス内 AbstractCollection<ElementType extends XMLObject>public boolean contains(ElementType element)
element - the element to check forpublic ElementType get(int index)
get インタフェース内 List<ElementType extends XMLObject>get クラス内 AbstractList<ElementType extends XMLObject>public ElementType set(int index, ElementType element) throws IllegalArgumentException
set インタフェース内 List<ElementType extends XMLObject>set クラス内 AbstractList<ElementType extends XMLObject>index - index of the XMLObject to be replacedelement - element to be stored at the given indexIllegalArgumentException - thrown if the given XMLObject already has a parent that is different from the
XMLObject given at list construction timepublic void add(int index,
ElementType element)
throws IllegalArgumentException
add インタフェース内 List<ElementType extends XMLObject>add クラス内 AbstractList<ElementType extends XMLObject>index - index at which to add the given XMLObjectelement - element to be stored at the given indexIllegalArgumentException - thrown if the given XMLObject already has a parent that is different from the
XMLObject given at list construction timepublic ElementType remove(int index)
remove インタフェース内 List<ElementType extends XMLObject>remove クラス内 AbstractList<ElementType extends XMLObject>public boolean remove(ElementType element)
element - the element to be removedprotected void setParent(ElementType element) throws IllegalArgumentException
element - the element to set the parent onIllegalArgumentException - thrown if the given element already has a parent and it is different than the
parent given at list construction timeCopyright © 2012. All Rights Reserved.