content: package com.alibaba.spring.util;
  
  /**
   * User POJO
   *
   * @author <a href="mailto:mercyblitz@gmail.com">Mercy</a>
   * @since 2017.03.31
   */
  public class User {
  
      private String name;
  
      private int age;
  
      public String getName() {
          return name;
      }
  
      public void setName(String name) {
          this.name = name;
      }
  
      public int getAge() {
          return age;
      }
  
      public void setAge(int age) {
          this.age = age;
      }
  
      @Override
      public boolean equals(Object o) {
          if (this == o) return true;
          if (!(o instanceof User)) return false;
  
          User user = (User) o;
  
          if (getAge() != user.getAge()) return false;
          return getName() != null ? getName().equals(user.getName()) : user.getName() == null;
      }
  
      @Override
      public int hashCode() {
          int result = getName() != null ? getName().hashCode() : 0;
          result = 31 * result + getAge();
          return result;
      }
  
      @Override
      public String toString() {
          return "User{" +
                  "name='" + name + '\'' +
                  ", age=" + age +
                  '}';
      }
  }
  