public Node nextSibling() {
        if (parentNode == null)
            return null; // root

        final List<Node> siblings = parentNode.ensureChildNodes();
        final int index = siblingIndex+1;
        if (siblings.size() > index)
            return siblings.get(index);
        else
            return null;
    }
public Node nextSibling ( ) { if ( parentNode == null ) return null ; final List < Node > siblings = parentNode . ensureChildNodes ( ) ; final int index = siblingIndex + 1 ; if ( siblings . size ( ) > index ) return siblings . get ( index ) ; else return null ; }
Get this node's next sibling.
@return next sibling, or null if this is the last sibling