java.util.HashMap

Posted Trace Spaces

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了java.util.HashMap相关的知识,希望对你有一定的参考价值。

 
Operations Time Complexity Notes
get, put O(1) assuming the hash function has dispersed the elements properly among the buckets
iteration over collection views proportional to the capacity plus the size do not set the initial capacity too high or the load factor too low
  • Making no guarantees to the iteration order and the constantness of the order over time either.
  • Unsynchronized and permitting nulls(both for key and value)
  • 未完待续

 

以上是关于java.util.HashMap的主要内容,如果未能解决你的问题,请参考以下文章