写在前面(声明)
声明:这里的各个内容基本都是平时看到的一些觉得有用的文章资讯的汇总,里面的内容都不一定我的创作!
做个快乐的搬运工!
- 老哥,您看我这篇Java集合,还有机会评优吗?
概念
oracle官方对集合框架的概念:
- The collections framework is a unified architecture for representing and manipulating collections, enabling them to be manipulated independently of the details of their representation. It reduces programming effort while increasing performance. It enables interoperability among unrelated APIs, reduces effort in designing and learning new APIs, and fosters software reuse. The framework is based on more than a dozen collection interfaces. It includes implementations of these interfaces and algorithms to manipulate them.
- The collection interfaces are divided into two groups. The most basic interface, java.util.Collection
- The other collection interfaces are based on java.util.Map and are not true collections. However, these interfaces contain collection-view operations, which enable them to be manipulated as collections.
百度翻译下:
集合框架是用于表示和操作集合的统一架构,使它们能够独立于其表示的细节进行操作。它减少了编程工作量,同时提高了性能。它实现了无关API之间的互操作性,减少了设计和学习新API的工作量,并促进了软件重用。该框架基于十几个集合接口。它包括这些接口的实现和操作它们的算法。参考:
- The Collections Framework
- Collections Framework Overview
- Outline of the Collections Framework
- 老哥,您看我这篇Java集合,还有机会评优吗?
- Java常见集合的默认大小及扩容机制(JDK7)
Collection
- Collection API
- java.util.Collections.copy()方法注意点
- HashSet、TreeSet、CopyOnWriteArraySet和CopyOnWriteArrayList
List
- List去除重复数据的五种方式,学到了
- ArrayList和LinkedList那个更占空间
ArrayList
参考来源:
- Java ArrayList 工作原理及实现
- Java ArrayList 踩坑记录
- 关于 ArrayList 的 5 道面试题
- java List复制:浅拷贝与深拷贝
- 备注: 1. ArrayList 扩容机制int newCapacity = oldCapacity + (oldCapacity >> 1); 2. ArrayList复制的时候需要注意深浅拷贝问题;新建一个List去接受新值也是浅拷贝;Collections.copy()为深拷贝,其他都基本是浅拷贝;
- Java 数据结构- ArrayList 最细致的解析笔记
- ArrayList中remove方法的坑
- 请谨慎使用Arrays.asList、ArrayList的subList
Concurrent
- CopyOnWriteArrayList实现原理以及源码解析
- CopyOnWriteArraySet
Set
- HashSet、TreeSet、CopyOnWriteArraySet和CopyOnWriteArrayList
Map
- Map API
HashMap
- JDK1.7中HashMap底层实现原理
- 一文搞定HashMap的实现原理(jdk1.8)
- jdk7和jdk8HashMap主要的区别
- 都说 HashMap 是线程不安全的,到底体现在哪儿?
- JDK bug?? HashMap中的死循环问题!
- 为什么要先高16位异或低16位再取模运算 备注:右移16位,自己的高半区和低半区异或,就是为了混合原始哈希码的高位和低位,以此来加大低位随机性。
- 为什么 HashMap 的加载因子是0.75?
Concurrent
- Java并发包concurrent——ConcurrentHashMap
- Java并发编程笔记之ConcurrentHashMap原理探究
- ConcurrentHashMap 使用:每个 Key 只调用 1 个方法
- 为什么 ConcurrentHashMap 的读操作不需要加锁?
- Java 8 ConcurrentHashMap源码中竟然隐藏着两个BUG
- ConcurrentHashMap中有十个提升性能的细节,你都知道吗?