no.uio.edd.utils.xmlutils
Class ExtendableNodeList
java.lang.Object
no.uio.edd.utils.datautils.ExtendableObjectList
no.uio.edd.utils.xmlutils.ExtendableNodeList
public class ExtendableNodeList
- extends ExtendableObjectList
Objects of this class is used to store list of Nodes. The list may be of
variable length. The list is zero indexed.
Do not actually check that only nodes are added, but will throw an exception
on retrieval if anything else is there.
Elements cannot be removed; set to null instead.
Implementation notes: Maximum length of the list is the maximum length of the
datatype int. The actual storage is in arrays. Initially the length is 10,
the array is expanded in chunks of 10. Will not scale for long lists.
- Author:
- oeide
Method Summary |
org.w3c.dom.Node |
getElem(int num)
Return one element from the list. |
org.w3c.dom.Node[] |
getList()
Get the full object list held by this object. |
org.w3c.dom.Node |
item(int index)
Return one element from the list. |
Methods inherited from class no.uio.edd.utils.datautils.ExtendableObjectList |
addElem, addElemUnlessAlreadyThere, addObjectArray, emptyList, findObject, getLength, getLengthNoNulls, getListNoNulls, getNextFree, nullFirstObjectInList, nullObjectsInList, removeDuplicates, removeDuplicatesAndNulls, setElem |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExtendableNodeList
public ExtendableNodeList()
getElem
public org.w3c.dom.Node getElem(int num)
- Description copied from class:
ExtendableObjectList
- Return one element from the list.
- Overrides:
getElem
in class ExtendableObjectList
- Parameters:
num
- The index number of the element to be returned.
- Returns:
item
public org.w3c.dom.Node item(int index)
- Return one element from the list.
- Parameters:
index
- The index number of the element to be returned.
- Returns:
- The Node in the index'th position.
getList
public org.w3c.dom.Node[] getList()
- Description copied from class:
ExtendableObjectList
- Get the full object list held by this object. Will normally include
trailing null elements that was never initialised.
- Overrides:
getList
in class ExtendableObjectList
- Returns: