code: public int compareTo(final T element) {
          if (element == null) {
              // Comparable API says throw NPE on null
              throw new NullPointerException("Element is null");
          }
  
          if (isBefore(element)) {
              return -1;
          } else if (isAfter(element)) {
              return 1;
          } else {
              return 0;
          }
      }
docs: <p>
  Checks where the specified element occurs relative to this range.
  </p>
  
  <p>
  Returns {@code -1} if this range is before the specified element,
  {@code 1} if the this range is after the specified element, otherwise {@code 0} if the specified element is contained in this range.
  </p>
  
  @param element
  the element to check for, not null
  @return -1, 0 or +1 depending on the element's location relative to the range