Here you can find the source of multiple(BigDecimal dividend, int divisor)
public static boolean multiple(BigDecimal dividend, int divisor)
//package com.java2s; /*// www .ja v a 2s . c o m * Este programa es software libre; usted puede redistribuirlo y/o modificarlo bajo los terminos * de la licencia "GNU General Public License" publicada por la Fundacion "Free Software Foundation". * Este programa se distribuye con la esperanza de que pueda ser util, pero SIN NINGUNA GARANTIA; * vea la licencia "GNU General Public License" para obtener mas informacion. */ import java.math.BigDecimal; import java.math.BigInteger; public class Main { public static boolean multiple(Byte dividend, int divisor) { return dividend != null && divisor != 0 && dividend % divisor == 0; } public static boolean multiple(Short dividend, int divisor) { return dividend != null && divisor != 0 && dividend % divisor == 0; } public static boolean multiple(Integer dividend, int divisor) { return dividend != null && divisor != 0 && dividend % divisor == 0; } public static boolean multiple(Long dividend, int divisor) { return dividend != null && divisor != 0 && dividend % divisor == 0; } public static boolean multiple(Float dividend, int divisor) { return dividend != null && divisor != 0 && dividend % divisor == 0; } public static boolean multiple(Double dividend, int divisor) { return dividend != null && divisor != 0 && dividend % divisor == 0; } public static boolean multiple(BigInteger dividend, int divisor) { return dividend != null && divisor != 0 && dividend.remainder(BigInteger.valueOf(divisor)).equals(BigInteger.ZERO); } public static boolean multiple(BigDecimal dividend, int divisor) { return dividend != null && divisor != 0 && dividend.remainder(BigDecimal.valueOf(divisor)).equals(BigDecimal.ZERO); } }