public static BigDecimal toBigDecimal(Number self){
  if ((self instanceof Long) || (self instanceof Integer) || (self instanceof Short)|| (self instanceof Byte)) {
    return BigDecimal.valueOf(self.longValue());
  }
  return new BigDecimal(self.toString());
}

public static BigDecimal toBigDecimal ( Number self ) { if ( ( self instanceof Long ) || ( self instanceof Integer ) || ( self instanceof Short ) || ( self instanceof Byte ) ) { return BigDecimal . valueOf ( self . longValue ( ) ) ; } return new BigDecimal ( self . toString ( ) ) ; }
transform a number into a bigdecimal
