code: private boolean isInt(String str) {
          try {
              Integer.parseInt(str);
          } catch (NumberFormatException e) {
              return false;
          }
          return true;
      }
docs: Checks if the specified string is an integer.
  
  @param str the string to check
  @return {@code true} if the specified string is an integer
  or {@code false} otherwise