io.ebeaninternal.util.ValueUtil Maven / Gradle / Ivy
package io.ebeaninternal.util;
import java.math.BigDecimal;
import java.net.URL;
public final class ValueUtil {
/**
* Helper method to check if two objects are equal.
*/
@SuppressWarnings("unchecked")
public static boolean areEqual(Object obj1, Object obj2) {
if (obj1 == null) {
return (obj2 == null);
}
if (obj2 == null) {
return false;
}
if (obj1 == obj2) {
return true;
}
if (obj1 instanceof BigDecimal) {
// Use comparable for BigDecimal as equals
// uses scale in comparison...
if (obj2 instanceof BigDecimal) {
Comparable
© 2015 - 2024 Weber Informatics LLC | Privacy Policy