![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Collection
找不到工作的小白白
啦啦啦 找工作 找不到 好好学 写博客 学知识 哇咔咔
展开
-
Collections.unmodifiableList方法的使用及介绍
在《重构——改善既有代码的设计》一书中,有一种重构手法叫Encapsulate Collection(封装集群),为了演示该重构手法,我写了四个类,通过对比重构前后的代码,加深对这一重构手法的理解。类Student有一ArrayList属性,如果没有阅读《重构——改善既有代码的设计》一书,很多人可能会像我一样,如下设计类Student。但是,如果通过Student.getCourses(...转载 2019-01-11 09:15:01 · 509 阅读 · 0 评论 -
Map小记
final V putVal(int hash, K key, V value, boolean onlyIfAbsent, boolean evict) { Node<K,V>[] tab; Node<K,V> p; int n, i; //第一次put元素,初始化数组大小 if ((...原创 2019-05-29 11:04:58 · 112 阅读 · 0 评论