code: public boolean hasDouble(String attributeName) {
          String attr = attributes.get(attributeName);
          if (attr == null || attr.isEmpty()) {
              return false;
          }
          try {
              Double.parseDouble(attr);
              return true;
          } catch (NumberFormatException ex) {
              return false;
          }
      }
docs: Check if there is a valid integer attribute.
  @param attributeName the attribute name
  @return true if the attribute is a valid int