code: private static int comparePadding(List<Element> elements, int index, Boolean number)
      {
          int rel = 0;
  
          for (Iterator<Element> it = elements.listIterator(index); it.hasNext();) {
              Element element = it.next();
              if (number != null && number.booleanValue() != element.isNumber()) {
                  break;
              }
  
              rel = element.compareTo(null);
              if (rel != 0) {
                  break;
              }
          }
  
          return rel;
      }
docs: Compare the end of the version with 0.
  
  @param elements the elements to compare to 0
  @param index the index where to start comparing with 0
  @param number indicate of the previous element is a number
  @return the comparison result