As an alternative to the solution already provided, you can use regex:
Pattern doublePattern = Pattern.compile("^\d*$");
Matcher matchesDouble = doublePattern.matcher(myString);
boolean isDouble = matchesDouble.matches();
or:
boolean isDouble = Pattern.matches("^\d*$", myString);