Xerces2 Implementation: Class XSObjectListImpl

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.xerces.impl.xs.util
Class XSObjectListImpl

    java.lang.Object
      |
      +--org.apache.xerces.impl.xs.util.XSObjectListImpl

All Implemented Interfaces:
  org.apache.xerces.xs.XSObjectList

public class XSObjectListImpl
extends java.lang.Object
implements org.apache.xerces.xs.XSObjectList

Containts a list of XSObject's.

# INTERNAL:

  Usage of this class is not supported. It may be altered or removed at any time.

Version:
  $Id: XSObjectListImpl.java 446723 2006-09-15 20:37:45Z mrglavas $
Author:
  Sandy Gao, IBM

Field Summary
`static org.apache.xerces.xs.XSObjectList` | `EMPTY_LIST` An immutable empty list.

Constructor Summary
`XSObjectListImpl()`
`XSObjectListImpl(org.apache.xerces.xs.XSObject[] array, int length)` Construct an XSObjectList implementation

Method Summary
`void` | `add(int index, org.apache.xerces.xs.XSObject object)`
`void` | `add(org.apache.xerces.xs.XSObject object)`
`void` | `clear()`
`int` | `getLength()` The number of `XSObjects` in the list.
`org.apache.xerces.xs.XSObject` | `item(int index)` Returns the `index`th item in the collection.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### EMPTY_LIST

    public static final org.apache.xerces.xs.XSObjectList EMPTY_LIST

  An immutable empty list.

Constructor Detail

### XSObjectListImpl

    public XSObjectListImpl()

### XSObjectListImpl

    public XSObjectListImpl(org.apache.xerces.xs.XSObject[] array,
                            int length)

  Construct an XSObjectList implementation
  Parameters:
    `array` - the data array
    `length` - the number of elements

Method Detail

### getLength

    public int getLength()

  The number of `XSObjects` in the list. The range of valid child node indices is 0 to `length-1` inclusive.
  Specified by:
    `getLength` in interface `org.apache.xerces.xs.XSObjectList`

### item

    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`.
  Specified by:
    `item` in interface `org.apache.xerces.xs.XSObjectList`
  Parameters:
    `index` - index into the collection.
  Returns:
    The XSObject at the `index`th position in the `XSObjectList`, or `null` if that is not a valid index.

### clear

    public void clear()

### add

    public void add(org.apache.xerces.xs.XSObject object)

### add

    public void add(int index,
                    org.apache.xerces.xs.XSObject object)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1999-2007 The Apache Software Foundation. All Rights Reserved.