public static void checkIndexAndLog(@NotNull Class<?> loggingClass, int index, int size, @NotNull String indexDescription) {
    if (index < 0 || index >= size) {
      Logger.getInstance(loggingClass).error(new IndexOutOfBoundsException(badElementIndex(index, size, indexDescription)));
    }
  }
public static void checkIndexAndLog(@NotNull Class<?> loggingClass, int index, int size, @NotNull String indexDescription)