Here you can find the source of decimal(Object o)
public static boolean decimal(Object o)
//package com.java2s; //License from project: Apache License public class Main { public static boolean decimal(Object o) { double n = 0; try {// w ww . j av a 2s.co m n = Double.parseDouble(o.toString().trim()); } catch (NumberFormatException e) { e.printStackTrace(); } if (n > 0.0) { return true; } else { return false; } } }