添加 BigDecimal 的 equal 方法。
parent
716cda893d
commit
d1dfbd273e
|
@ -0,0 +1,14 @@
|
|||
package xyz.zhouxy.plusone.commons.util;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
public class BigDecimals {
|
||||
|
||||
public static boolean equals(BigDecimal a, BigDecimal b) {
|
||||
return (a == b) || (a != null && a.compareTo(b) == 0);
|
||||
}
|
||||
|
||||
private BigDecimals() {
|
||||
throw new IllegalStateException("Utility class");
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue