JAVA 8 HashMap 源碼查看

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  
 *
相關文章
相關標籤/搜索