XSObjectListImplpublic class XSObjectListImpl extends Object implements XSObjectListContaints a list of XSObject's. |
Fields Summary |
---|
public static final XSObjectList | EMPTY_LISTAn immutable empty list. | private static final int | DEFAULT_SIZE | private XSObject[] | fArray | private int | fLength |
Constructors Summary |
---|
public XSObjectListImpl()
fArray = new XSObject[DEFAULT_SIZE];
fLength = 0;
| public XSObjectListImpl(XSObject[] array, int length)Construct an XSObjectList implementation
fArray = array;
fLength = length;
|
Methods Summary |
---|
public void | add(com.sun.org.apache.xerces.internal.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, com.sun.org.apache.xerces.internal.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 com.sun.org.apache.xerces.internal.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];
|
|