docs: public static boolean isLongLiteral(String str) {
      if (str == null || str.isEmpty()) return false;
      char[] chars = str.toCharArray();
      for (int i = 0; i < chars.length; i++) {
        char c = chars[i];
        if ((c < '0' && (i != 0 || c != '-')) || c > '9') return false;
      }
      return true;
    }