Here you can find the source of isPositive(BigDecimal value)
public static Boolean isPositive(BigDecimal value)
//package com.java2s; //License from project: Open Source License import java.math.BigDecimal; public class Main { public static Boolean isPositive(Integer value) { return value != null && value > 0; }/*from www.j a v a2s . com*/ public static Boolean isPositive(BigDecimal value) { return value != null && value.compareTo(BigDecimal.ZERO) > 0; } public static Boolean isPositive(Object value) { return isPositive(forceParseBigDecimal(value)); } public static BigDecimal forceParseBigDecimal(Object value) { if (value == null || value.toString().isEmpty()) { return new BigDecimal(0); } else { try { Double check = Double.parseDouble(value.toString()); return new BigDecimal(check); } catch (NumberFormatException e) { return new BigDecimal(0); } } } public static Double parseDouble(Object value) { if (value == null || value.toString().isEmpty()) { return null; } else { try { return Double.parseDouble(value.toString()); } catch (NumberFormatException e) { return null; } } } }