
Java-Source-container
小烁笔记
这个作者很懒,什么都没留下…
展开
-
ArrayList 源代码
ArrayList 源代码原创 2015-11-03 13:07:14 · 736 阅读 · 0 评论 -
TreeSet 源代码
1、介绍TreeSet前先介绍它实现的接口NavigableSet/* * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * *//* * * * * * * Written原创 2015-11-15 14:15:29 · 513 阅读 · 0 评论 -
WeakHashMap 源代码
本文通过WeakHashMap源代码分析,理解代码中的知识点原创 2015-11-22 22:42:06 · 656 阅读 · 0 评论 -
ListIterator接口 源代码
ListIterator接口源代码分析原创 2015-11-02 09:37:05 · 976 阅读 · 0 评论 -
AbstractCollection 抽象类 源代码
AbstractCollection 抽象类 源代码原创 2015-11-02 15:09:03 · 547 阅读 · 0 评论 -
LinkedHashMap 源代码
扩容机制等可以看父类HashMap文章:HashMap 源代码该类主要实现了用链表来实现HashMap的实现方式/* * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to原创 2015-11-18 20:26:33 · 623 阅读 · 0 评论 -
Iterator接口 源代码
Java容器中的Iterator接口源代码原创 2015-11-02 09:23:02 · 723 阅读 · 0 评论 -
List 接口 源代码
List 接口的源代码原创 2015-11-02 12:39:19 · 803 阅读 · 0 评论 -
Collection 接口 源代码
Collection 接口 源代码原创 2015-11-02 10:43:38 · 804 阅读 · 0 评论 -
HashMap 源代码
通过查看HashMap源代码,了解它的初始化容量、加载因子及最大容量,初始化机制,扩容机制,及底层实现,底层实现是桶/链表和桶/红黑树一起结合的原创 2015-11-18 16:50:36 · 1967 阅读 · 9 评论 -
AbstractList 抽象类 源代码
AbstractList 抽象类 源代码原创 2015-11-02 19:15:01 · 542 阅读 · 0 评论 -
Queue AbstractQueue Deque 源代码
Queue AbstractQueue Deque 源代码原创 2015-11-04 11:05:56 · 560 阅读 · 0 评论 -
LinkedHashSet 源代码
1,在LinkedHashSet源代码中可以发现,只是简单的实现了构造方法,其实具体实现在HashSet中,如果是LinkedHashSet,则底层是用LinkedHashMap实现的 //构造方法,map用的是LinkedHashMap HashSet(int initialCapacity, float loadFactor, boolean dummy) {原创 2015-11-15 10:56:20 · 549 阅读 · 0 评论 -
IdentityHashMap 源代码
介绍IdentityHashMap源代码,通过初始化、扩容机制等其他方面来介绍原创 2015-11-20 09:56:06 · 848 阅读 · 2 评论 -
Vector 源码
1、Vector扩容机制Vector有个capacityIncrement来记录每次扩容的容量,默认为0,初始化的时候可以 /** * The amount by which the capacity of the vector is automatically * incremented when its size becomes greater than its c原创 2015-11-04 08:22:11 · 702 阅读 · 0 评论 -
Stack 源代码
Stack 源代码原创 2015-11-04 09:20:32 · 664 阅读 · 0 评论 -
LinkedList 源代码
LinkedList 源代码原创 2015-11-03 22:28:38 · 622 阅读 · 0 评论 -
PriorityQueue 源代码
PriorityQueue 源代码原创 2015-11-04 16:39:35 · 701 阅读 · 0 评论 -
ArrayDeque 源码
ArrayDeque 源码原创 2015-11-04 22:28:52 · 581 阅读 · 0 评论 -
Set 接口 源代码
Set 接口 源代码/* * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * *原创 2015-11-14 16:05:18 · 564 阅读 · 0 评论 -
AbstractSet 源代码
AbstractSet源代码/* * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * *原创 2015-11-14 19:37:39 · 486 阅读 · 0 评论 -
SortedSet 接口 源代码
SortedSet 接口 源代码原创 2015-11-14 18:41:54 · 493 阅读 · 0 评论 -
HashSet 源代码
1、HashSet的底层是HashMap,将每一个元素当成HashMap中的key,将PRESENT当成HashMap中的value //HashSet是底层是用HashMap实现的,将每个元素当做HashMap中的key private transient HashMap map; // Dummy value to associate with an Objec原创 2015-11-14 22:41:08 · 538 阅读 · 0 评论 -
Map 接口 源代码
只是简单的介绍了Map中的Java8之前的代码,Java8新特性的代码还没了解,以后会补上/* * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.原创 2015-11-15 16:07:09 · 688 阅读 · 0 评论 -
AbstractMap 源代码
源代码/* * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * *原创 2015-11-15 19:07:45 · 831 阅读 · 0 评论 -
Hashtable 源代码
1、Hashtable是线程安全的,实现的方式是在方法加上synchronized关键字。2、初始容量为11,初始加载因子为0.75f3、扩容机制桶最大为Integer.MAX_VALUE - 8,每次扩容需要扩容为原来的2倍 //最大的桶数量 private static final int MAX_ARRAY_SIZE =原创 2015-11-19 10:48:21 · 630 阅读 · 0 评论