FileDocCategorySizeDatePackage
MockNodeList.javaAPI DocAndroid 1.5 API1624Wed May 06 22:41:10 BST 2009com.android.ide.eclipse.editors.mock

MockNodeList

public class MockNodeList extends Object implements NodeList
A quick mock implementation of NodeList on top of ArrayList.

Fields Summary
ArrayList
mChildren
Constructors Summary
public MockNodeList(MockXmlNode[] children)
Constructs a node list from a given children list.

param
children The children list. Can be null.

        mChildren = new ArrayList<MockXmlNode>();
        if (children != null) {
            for (MockXmlNode n : children) {
                mChildren.add(n);
            }
        }
    
Methods Summary
public java.util.ArrayListgetArrayList()

        return mChildren;
    
public intgetLength()

        return mChildren.size();
    
public org.w3c.dom.Nodeitem(int index)

        if (index >= 0 && index < mChildren.size()) {
            return mChildren.get(index);
        }
        return null;