//set集合中会去掉重复的记录数
Set<User> set=new HashSet<User>();
User user=new User("1","朱磊","username","userpass",new Date());
User user2=new User("2","朱磊","username","userpass",new Date());
User user3=new User("3","朱磊","username","userpass",new Date());
User user1=new User("2","朱磊","username","userpass",new Date());
set.add(user);
set.add(user2);
set.add(user3);
set.add(user1);
set.add(user1);
System.out.println(set.size());