package com.bjorktech.cayman.idea.common.guava.base;

import com.bjorktech.cayman.idea.common.dto.UserDTO;
import com.google.common.base.Strings;


import java.util.Objects;

import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;

/**
 * User: sheshan
 * Date: 2018/8/1
 * content:
 */
public class ObjectsDemo {
    /**
     * Objects.equal帮助你执行null敏感的equals判断，从而避免抛出NullPointerException
     */
    public static void main(String[] args) {
        System.out.println(Objects.equals(null, null));
        //int的hash值
        System.out.println(Objects.hash("xionger", 15));

        //Objects.toStringHelper(new UserDTO("xionger", 15), "shuaiqi").a
    }
}
