code: public int elementCompareTo(T element) {
      if (element == null) {
        // Comparable API says throw NPE on null
        throw new NullPointerException("Element is null");
      }
      if (isAfter(element)) {
        return -1;
      } else if (isBefore(element)) {
        return 1;
      } else {
        return 0;
      }
    }
docs: <p>
  Checks where the specified element occurs relative to this range. The API is reminiscent of the
  Comparable interface returning {@code -1} if the element is before the range, {@code 0} if
  contained within the range and {@code 1} if the element is after the 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