Java 容器
shanyu312
这个作者很懒,什么都没留下…
展开
-
HashMap tableSizeFor方法
hashmap 的数量是保证容量为2的整数幂 那么他是如何保证的呢: 通过一下方法确认的,比方我们输入13,其实最终是16也就是输出最近的2的整数幂 /** * Returns a power of two size for the given target capacity. */ static final int tableSizeFor(int cap) { int n = ca...原创 2018-12-12 20:12:37 · 212 阅读 · 0 评论 -
Map解析
文档地址: 中文:https://aisia.moe/java6api-cn/index.html?javax/xml/ws/handler/MessageContext.html 原文:https://docs.oracle.com/javase/8/docs/api/java/util/Map.html 1.SimpleBindings<String,Object>,key必须是...原创 2019-01-08 16:56:11 · 245 阅读 · 0 评论