JAVA 8 HashMap 源码查看

原创
2016/08/20 17:14
阅读数 37

Java 8 HashMap

/**
 * 1. Hash tables based implementation of the Map interface. This implementation provides all of the  
 * operations, and permits null values and the null key. The HashMap class is roughly equivalent to  
 * Hashtable, except that it is unsynchronized and permits nulls. this class makes no guarantees(v.保证;n.保证)   
 * as to the order of the map; in particular , it does not guarantee that the order will remain constant over time. 

 * 2. This implementation provides constant-time performance for the basic operations get and put, assuming  
 * the hash function disperses(v.分配) the elements properly among the bucket. Interation over collection  
 * view requires time proportional to(与什么成比例) the "capacity" of the HashMap instance plus its size.   
 * thus , its very importance not to set the initial capacity to hight (or the load factory to low) if interation  
 * performance is importance  
 *   
 * 3. An instance of HashMap has two parameters that affect its performance: initial capacity and load  
 * factor. The capacity is the number of bucket in the hash table , and the initial capacity is simply the  
 * 
展开阅读全文
打赏
0
0 收藏
分享
加载中
更多评论
打赏
0 评论
0 收藏
0
分享
返回顶部
顶部