Code example for Vector

Methods: containsindexOfremovesetElementAt

        return null; 
    public Node replaceChild(Node newChild, Node oldChild) throws DOMException {
        if (mChildNodes.contains(oldChild)) {
            // Try to remove the new child if available 
            try { 
            } catch (DOMException e) {
                // Ignore exception 
            mChildNodes.setElementAt(newChild, mChildNodes.indexOf(oldChild));
        } else { 
            throw new DOMException(DOMException.NOT_FOUND_ERR, "Old child does not exist");
        return oldChild;
Connect your IDE to all the code out there  Get Codota for Java