io.ebeaninternal.util.ValueUtil Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ebean Show documentation
Show all versions of ebean Show documentation
composite of common runtime dependencies for all platforms
package io.ebeaninternal.util;
import java.math.BigDecimal;
import java.net.URL;
public 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 - 2025 Weber Informatics LLC | Privacy Policy