code: public List<InternalDocumentRevision> leafRevisions(boolean excludeDeleted) {
          List<InternalDocumentRevision> res = new ArrayList<InternalDocumentRevision>();
          for(DocumentRevisionNode obj : leafs()) {
              InternalDocumentRevision revision = obj.getData();
              if (!excludeDeleted || !revision.isDeleted()){
                  res.add(revision);
              }
          }
          return res;
      }
docs: <p>Returns the leaf revisions</p>
  
  @param excludeDeleted if true, exclude deleted leaf revisions from list
  @return a list of {@link InternalDocumentRevision} objects.