XSObjectListImplpublic class XSObjectListImpl extends Object implements org.apache.xerces.xs.XSObjectListContaints a list of XSObject's. |
Fields Summary |
---|
public static final org.apache.xerces.xs.XSObjectList | EMPTY_LISTAn immutable empty list. | private static final int | DEFAULT_SIZE | private org.apache.xerces.xs.XSObject[] | fArray | private int | fLength |
Constructors Summary |
---|
public XSObjectListImpl()
fArray = new XSObject[DEFAULT_SIZE];
fLength = 0;
| public XSObjectListImpl(org.apache.xerces.xs.XSObject[] array, int length)Construct an XSObjectList implementation
fArray = array;
fLength = length;
|
Methods Summary |
---|
public void | add(org.apache.xerces.xs.XSObject object)
if (fLength == fArray.length){
XSObject[] temp = new XSObject[fLength + 4];
System.arraycopy(fArray, 0, temp, 0, fLength);
fArray = temp;
}
fArray[fLength++]=object;
| public void | add(int index, org.apache.xerces.xs.XSObject object)
fArray [index] = object;
| public void | clear()
for (int i=0; i<fLength; i++) {
fArray[i] = null;
}
fArray = null;
fLength = 0;
| public int | getLength()The number of XSObjects in the list. The range of valid
child node indices is 0 to length-1 inclusive.
return fLength;
| public org.apache.xerces.xs.XSObject | item(int index)Returns the index th item in the collection. The index
starts at 0. If index is greater than or equal to the
number of nodes in the list, this returns null .
if (index < 0 || index >= fLength)
return null;
return fArray[index];
|
|