docs: @Pure
  	public static <T> int getInsertionIndex(List<T> list, Comparator<? super T> comparator, T elt, boolean allowMultiple) {
  		try {
  			assert comparator != null;
  			assert list != null;
  			if (elt == null) {
  				return -1;
  			}
  
  			int first = 0;
  			int last = list.size() - 1;
  
  			while (last >= first) {
  				final int center = (first + last) / 2;
  				final T indata = list.get(center);
  				final int comparison = comparator.compare(elt, indata);
  				if (!allowMultiple && comparison == 0) {
  					return -1;
  				}
  				if (comparison < 0) {
  					last = center - 1;
  				} else {
  					first = center + 1;
  				}
  			}
  			return first;
  		} catch (AssertionError e) {
  			throw e;
  		} catch (Throwable exception) {
  			return -1;
  		}
  	}