摘要: 一、前言 前面分析了Set接口下的hashSet和linkedHashSet,下面接着来看treeSet,treeSet的底层实现是基于treeMap的。 四个关注点在treeSet上的答案 二、treeSet的数据结构 因为treeSet的底层是基于treeMap的,所以treeSet的数据结构就 阅读全文
posted @ 2019-03-01 17:49 吹灭读书灯 阅读(558) 评论(0) 推荐(0) 编辑
摘要: 一、前言 上篇已经分析了Set接口下HashSet,我们发现其操作都是基于hashMap的,接下来看LinkedHashSet,其底层实现都是基于linkedHashMap的。 二、linkedHashSet的数据结构 因为linkedHashSet的底层是基于linkedHashMap实现的,所以 阅读全文
posted @ 2019-03-01 15:03 吹灭读书灯 阅读(721) 评论(0) 推荐(0) 编辑
摘要: 一、前言 我们已经分析了List接口下的ArrayList和LinkedList,以及Map接口下的HashMap、LinkedHashMap、TreeMap,接下来看的是Set接口下HashSet和LinkedHashSet,其实在分析完了HashMap、LinkedHashMap之后,再来看Ha 阅读全文
posted @ 2019-03-01 11:54 吹灭读书灯 阅读(396) 评论(0) 推荐(0) 编辑