本文整理了Java中java.util.HashMap.doubleCapacity()
方法的一些代码示例,展示了HashMap.doubleCapacity()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HashMap.doubleCapacity()
方法的具体详情如下:
包路径:java.util.HashMap
类名称:HashMap
方法名:doubleCapacity
[英]Doubles the capacity of the hash table. Existing entries are placed in the correct bucket on the enlarged table. If the current capacity is, MAXIMUM_CAPACITY, this method is a no-op. Returns the table, which will be new unless we were already at MAXIMUM_CAPACITY.
[中]使哈希表的容量加倍。现有条目放在放大表上的正确桶中。如果当前容量为最大容量,则此方法为不可操作。返回表,除非我们已经达到最大容量,否则该表将是新的。
代码示例来源:origin: robovm/robovm
/**
* Inserts all of the elements of map into this HashMap in a manner
* suitable for use by constructors and pseudo-constructors (i.e., clone,
* readObject). Also used by LinkedHashMap.
*/
final void constructorPutAll(Map<? extends K, ? extends V> map) {
if (table == EMPTY_TABLE) {
doubleCapacity(); // Don't do unchecked puts to a shared table.
}
for (Entry<? extends K, ? extends V> e : map.entrySet()) {
constructorPut(e.getKey(), e.getValue());
}
}
代码示例来源:origin: robovm/robovm
tab = doubleCapacity();
index = hash & (tab.length - 1);
代码示例来源:origin: robovm/robovm
doubleCapacity();
return;
代码示例来源:origin: ibinti/bugvm
/**
* Inserts all of the elements of map into this HashMap in a manner
* suitable for use by constructors and pseudo-constructors (i.e., clone,
* readObject). Also used by LinkedHashMap.
*/
final void constructorPutAll(Map<? extends K, ? extends V> map) {
if (table == EMPTY_TABLE) {
doubleCapacity(); // Don't do unchecked puts to a shared table.
}
for (Entry<? extends K, ? extends V> e : map.entrySet()) {
constructorPut(e.getKey(), e.getValue());
}
}
代码示例来源:origin: MobiVM/robovm
/**
* Inserts all of the elements of map into this HashMap in a manner
* suitable for use by constructors and pseudo-constructors (i.e., clone,
* readObject). Also used by LinkedHashMap.
*/
final void constructorPutAll(Map<? extends K, ? extends V> map) {
if (table == EMPTY_TABLE) {
doubleCapacity(); // Don't do unchecked puts to a shared table.
}
for (Entry<? extends K, ? extends V> e : map.entrySet()) {
constructorPut(e.getKey(), e.getValue());
}
}
代码示例来源:origin: com.gluonhq/robovm-rt
/**
* Inserts all of the elements of map into this HashMap in a manner
* suitable for use by constructors and pseudo-constructors (i.e., clone,
* readObject). Also used by LinkedHashMap.
*/
final void constructorPutAll(Map<? extends K, ? extends V> map) {
if (table == EMPTY_TABLE) {
doubleCapacity(); // Don't do unchecked puts to a shared table.
}
for (Entry<? extends K, ? extends V> e : map.entrySet()) {
constructorPut(e.getKey(), e.getValue());
}
}
代码示例来源:origin: FlexoVM/flexovm
/**
* Inserts all of the elements of map into this HashMap in a manner
* suitable for use by constructors and pseudo-constructors (i.e., clone,
* readObject). Also used by LinkedHashMap.
*/
final void constructorPutAll(Map<? extends K, ? extends V> map) {
if (table == EMPTY_TABLE) {
doubleCapacity(); // Don't do unchecked puts to a shared table.
}
for (Entry<? extends K, ? extends V> e : map.entrySet()) {
constructorPut(e.getKey(), e.getValue());
}
}
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
/**
* Inserts all of the elements of map into this HashMap in a manner
* suitable for use by constructors and pseudo-constructors (i.e., clone,
* readObject). Also used by LinkedHashMap.
*/
final void constructorPutAll(Map<? extends K, ? extends V> map) {
if (table == EMPTY_TABLE) {
doubleCapacity(); // Don't do unchecked puts to a shared table.
}
for (Entry<? extends K, ? extends V> e : map.entrySet()) {
constructorPut(e.getKey(), e.getValue());
}
}
代码示例来源:origin: com.bugvm/bugvm-rt
/**
* Inserts all of the elements of map into this HashMap in a manner
* suitable for use by constructors and pseudo-constructors (i.e., clone,
* readObject). Also used by LinkedHashMap.
*/
final void constructorPutAll(Map<? extends K, ? extends V> map) {
if (table == EMPTY_TABLE) {
doubleCapacity(); // Don't do unchecked puts to a shared table.
}
for (Entry<? extends K, ? extends V> e : map.entrySet()) {
constructorPut(e.getKey(), e.getValue());
}
}
代码示例来源:origin: com.jtransc/jtransc-rt
/**
* Inserts all of the elements of map into this HashMap in a manner
* suitable for use by constructors and pseudo-constructors (i.e., clone,
* readObject). Also used by LinkedHashMap.
*/
final void constructorPutAll(Map<? extends K, ? extends V> map) {
if (table == EMPTY_TABLE) {
doubleCapacity(); // Don't do unchecked puts to a shared table.
}
for (Entry<? extends K, ? extends V> e : map.entrySet()) {
constructorPut(e.getKey(), e.getValue());
}
}
代码示例来源:origin: MobiVM/robovm
tab = doubleCapacity();
index = hash & (tab.length - 1);
代码示例来源:origin: ibinti/bugvm
tab = doubleCapacity();
index = hash & (tab.length - 1);
代码示例来源:origin: com.jtransc/jtransc-rt
tab = doubleCapacity();
index = hash & (tab.length - 1);
代码示例来源:origin: FlexoVM/flexovm
doubleCapacity();
return;
代码示例来源:origin: ibinti/bugvm
doubleCapacity();
return;
代码示例来源:origin: MobiVM/robovm
doubleCapacity();
return;
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
tab = doubleCapacity();
index = hash & (tab.length - 1);
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
doubleCapacity();
return;
代码示例来源:origin: com.gluonhq/robovm-rt
tab = doubleCapacity();
index = hash & (tab.length - 1);
代码示例来源:origin: com.bugvm/bugvm-rt
doubleCapacity();
return;
内容来源于网络,如有侵权,请联系作者删除!