code: public Node previousSibling() {
          if (parentNode == null)
              return null; // root
  
          if (siblingIndex > 0)
              return parentNode.ensureChildNodes().get(siblingIndex-1);
          else
              return null;
      }
docs: Get this node's previous sibling.
  @return the previous sibling, or null if this is the first sibling