java.util.Hashtable.doubleCapacity()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(4.8k)|赞(0)|评价(0)|浏览(161)

本文整理了Java中java.util.Hashtable.doubleCapacity()方法的一些代码示例,展示了Hashtable.doubleCapacity()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Hashtable.doubleCapacity()方法的具体详情如下:
包路径:java.util.Hashtable
类名称:Hashtable
方法名:doubleCapacity

Hashtable.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 Hashtable in a manner
 * suitable for use by constructors and pseudo-constructors (i.e., clone,
 * readObject).
 */
private 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

if (size++ > threshold) {
  tab = doubleCapacity();
  index = hash & (tab.length - 1);
  first = tab[index];

代码示例来源:origin: robovm/robovm

doubleCapacity();
return;

代码示例来源:origin: ibinti/bugvm

/**
 * Inserts all of the elements of map into this Hashtable in a manner
 * suitable for use by constructors and pseudo-constructors (i.e., clone,
 * readObject).
 */
private 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 Hashtable in a manner
 * suitable for use by constructors and pseudo-constructors (i.e., clone,
 * readObject).
 */
private 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 Hashtable in a manner
 * suitable for use by constructors and pseudo-constructors (i.e., clone,
 * readObject).
 */
private 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 Hashtable in a manner
 * suitable for use by constructors and pseudo-constructors (i.e., clone,
 * readObject).
 */
private 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 Hashtable in a manner
 * suitable for use by constructors and pseudo-constructors (i.e., clone,
 * readObject).
 */
private 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 Hashtable in a manner
 * suitable for use by constructors and pseudo-constructors (i.e., clone,
 * readObject).
 */
private 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 Hashtable in a manner
 * suitable for use by constructors and pseudo-constructors (i.e., clone,
 * readObject).
 */
private 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

if (size++ > threshold) {
  tab = doubleCapacity();
  index = hash & (tab.length - 1);
  first = tab[index];

代码示例来源:origin: com.mobidevelop.robovm/robovm-rt

if (size++ > threshold) {
  tab = doubleCapacity();
  index = hash & (tab.length - 1);
  first = tab[index];

代码示例来源:origin: ibinti/bugvm

if (size++ > threshold) {
  tab = doubleCapacity();
  index = hash & (tab.length - 1);
  first = tab[index];

代码示例来源:origin: ibinti/bugvm

doubleCapacity();
return;

代码示例来源:origin: com.bugvm/bugvm-rt

doubleCapacity();
return;

代码示例来源:origin: com.mobidevelop.robovm/robovm-rt

doubleCapacity();
return;

代码示例来源:origin: MobiVM/robovm

doubleCapacity();
return;

代码示例来源:origin: FlexoVM/flexovm

doubleCapacity();
return;

代码示例来源:origin: com.jtransc/jtransc-rt

doubleCapacity();
return;

代码示例来源:origin: com.gluonhq/robovm-rt

doubleCapacity();
return;

相关文章