摘要: 源码如下 1 /** 2 * Removes the first occurrence of the specified element from this list, 3 * if it is present. If this list does not contain the element, 阅读全文
posted @ 2019-11-16 22:27 zhangxuezhi 阅读(1140) 评论(3) 推荐(2) 编辑
摘要: public class CopyOnWriteArrayList<E> implements List<E>, RandomAccess, Cloneable, java.io.Serializable 直译过来,就是写时复制的动态数组。 add(E e)方法,使用可重入锁ReentrantLoc 阅读全文
posted @ 2019-11-16 22:18 zhangxuezhi 阅读(249) 评论(0) 推荐(0) 编辑
摘要: public class LinkedList<E> extends AbstractSequentialList<E> implements List<E>, Deque<E>, Cloneable, java.io.Serializable 其中Deque为双端队列 add(E e)方法如下,就 阅读全文
posted @ 2019-11-16 18:00 zhangxuezhi 阅读(188) 评论(0) 推荐(0) 编辑
摘要: ArrayList public class ArrayList<E> extends AbstractList<E> implements List<E>, RandomAccess, Cloneable, java.io.Serializable add方法: /** * Appends the 阅读全文
posted @ 2019-11-16 16:33 zhangxuezhi 阅读(303) 评论(0) 推荐(0) 编辑
摘要: ConcurrentHashMap public class ConcurrentHashMap<K,V> extends AbstractMap<K,V> implements ConcurrentMap<K,V>, Serializable {} 可以看到,继承自AbstractMap, 实现了 阅读全文
posted @ 2019-11-16 15:18 zhangxuezhi 阅读(274) 评论(0) 推荐(0) 编辑