>>893
if(a.matches("[0-9]+")){
  int b = Integer.parseInt(a);
} else if(a.maches("[0-9][0,1].[0-9]+")) {
  double bb = Double.parseDouble(a);
} else {
  int b = 10;
}

試してないので上手くいくかは分かりません。