Code example for Vector

Methods: firstElement

0
    } 
 
    public Node getFirstChild() {
        Node firstChild = null;
        try { 
            firstChild = mChildNodes.firstElement();
        } 
        catch (NoSuchElementException e) {
            // Ignore and return null 
        } 
        return firstChild;
    } 
 
    public Node getLastChild() {
        Node lastChild = null;
        try { 
            lastChild = mChildNodes.lastElement();
        } 
        catch (NoSuchElementException e) {
            // Ignore and return null 
        }