hashset底层由hashmap实现(泛型key,值object,在hashmap中是present常量对象) hashset的值存放在hashmap的key上 底层hashmap的value都是present对象 部分源码: