code: @SuppressWarnings("unchecked")
    private int unsafeCompare(@NullableDecl Object o1, @NullableDecl Object o2) {
      Comparator<? super E> comparator = comparator();
      return (comparator == null)
          ? ((Comparable<Object>) o1).compareTo(o2)
          : ((Comparator<Object>) comparator).compare(o1, o2);
    }
docs: unsafe, but worst case is a CCE is thrown, which callers will be expecting