package com.face.util;

import org.apache.commons.lang3.StringUtils;

import java.util.Objects;

public class ObjectUtils {
    public static boolean equalsNullBlank(Object left, Object right) {
        if (left == null && right == null) {
            return true;
        }
        if (left == null && right instanceof String) {
            if (StringUtils.isBlank(right.toString())) {
                return true;
            }
        }
        if (left instanceof String && right == null) {
            if (StringUtils.isBlank(left.toString())) {
                return true;
            }
        }
        return Objects.equals(left, right);
    }
}
