本文整理了Java中java.util.Hashtable.constructorPutAll()
方法的一些代码示例,展示了Hashtable.constructorPutAll()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Hashtable.constructorPutAll()
方法的具体详情如下:
包路径:java.util.Hashtable
类名称:Hashtable
方法名:constructorPutAll
[英]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).
[中]以适合构造函数和伪构造函数使用的方式(即克隆、readObject)将map的所有元素插入此哈希表。
代码示例来源:origin: robovm/robovm
/**
* Constructs a new instance of {@code Hashtable} containing the mappings
* from the specified map.
*
* @param map
* the mappings to add.
*/
public Hashtable(Map<? extends K, ? extends V> map) {
this(capacityForInitSize(map.size()));
constructorPutAll(map);
}
代码示例来源:origin: robovm/robovm
/**
* Returns a new {@code Hashtable} with the same key/value pairs, capacity
* and load factor.
*
* @return a shallow copy of this {@code Hashtable}.
* @see java.lang.Cloneable
*/
@SuppressWarnings("unchecked")
@Override public synchronized Object clone() {
/*
* This could be made more efficient. It unnecessarily hashes all of
* the elements in the map.
*/
Hashtable<K, V> result;
try {
result = (Hashtable<K, V>) super.clone();
} catch (CloneNotSupportedException e) {
throw new AssertionError(e);
}
// Restore clone to empty state, retaining our capacity and threshold
result.makeTable(table.length);
result.size = 0;
result.keySet = null;
result.entrySet = null;
result.values = null;
result.constructorPutAll(this);
return result;
}
代码示例来源:origin: MobiVM/robovm
/**
* Constructs a new instance of {@code Hashtable} containing the mappings
* from the specified map.
*
* @param map
* the mappings to add.
*/
public Hashtable(Map<? extends K, ? extends V> map) {
this(capacityForInitSize(map.size()));
constructorPutAll(map);
}
代码示例来源:origin: com.bugvm/bugvm-rt
/**
* Constructs a new instance of {@code Hashtable} containing the mappings
* from the specified map.
*
* @param map
* the mappings to add.
*/
public Hashtable(Map<? extends K, ? extends V> map) {
this(capacityForInitSize(map.size()));
constructorPutAll(map);
}
代码示例来源:origin: com.jtransc/jtransc-rt
/**
* Constructs a new instance of {@code Hashtable} containing the mappings
* from the specified map.
*
* @param map
* the mappings to add.
*/
public Hashtable(Map<? extends K, ? extends V> map) {
this(capacityForInitSize(map.size()));
constructorPutAll(map);
}
代码示例来源:origin: ibinti/bugvm
/**
* Constructs a new instance of {@code Hashtable} containing the mappings
* from the specified map.
*
* @param map
* the mappings to add.
*/
public Hashtable(Map<? extends K, ? extends V> map) {
this(capacityForInitSize(map.size()));
constructorPutAll(map);
}
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
/**
* Constructs a new instance of {@code Hashtable} containing the mappings
* from the specified map.
*
* @param map
* the mappings to add.
*/
public Hashtable(Map<? extends K, ? extends V> map) {
this(capacityForInitSize(map.size()));
constructorPutAll(map);
}
代码示例来源:origin: com.gluonhq/robovm-rt
/**
* Constructs a new instance of {@code Hashtable} containing the mappings
* from the specified map.
*
* @param map
* the mappings to add.
*/
public Hashtable(Map<? extends K, ? extends V> map) {
this(capacityForInitSize(map.size()));
constructorPutAll(map);
}
代码示例来源:origin: FlexoVM/flexovm
/**
* Constructs a new instance of {@code Hashtable} containing the mappings
* from the specified map.
*
* @param map
* the mappings to add.
*/
public Hashtable(Map<? extends K, ? extends V> map) {
this(capacityForInitSize(map.size()));
constructorPutAll(map);
}
代码示例来源:origin: FlexoVM/flexovm
/**
* Returns a new {@code Hashtable} with the same key/value pairs, capacity
* and load factor.
*
* @return a shallow copy of this {@code Hashtable}.
* @see java.lang.Cloneable
*/
@SuppressWarnings("unchecked")
@Override public synchronized Object clone() {
/*
* This could be made more efficient. It unnecessarily hashes all of
* the elements in the map.
*/
Hashtable<K, V> result;
try {
result = (Hashtable<K, V>) super.clone();
} catch (CloneNotSupportedException e) {
throw new AssertionError(e);
}
// Restore clone to empty state, retaining our capacity and threshold
result.makeTable(table.length);
result.size = 0;
result.keySet = null;
result.entrySet = null;
result.values = null;
result.constructorPutAll(this);
return result;
}
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
/**
* Returns a new {@code Hashtable} with the same key/value pairs, capacity
* and load factor.
*
* @return a shallow copy of this {@code Hashtable}.
* @see java.lang.Cloneable
*/
@SuppressWarnings("unchecked")
@Override public synchronized Object clone() {
/*
* This could be made more efficient. It unnecessarily hashes all of
* the elements in the map.
*/
Hashtable<K, V> result;
try {
result = (Hashtable<K, V>) super.clone();
} catch (CloneNotSupportedException e) {
throw new AssertionError(e);
}
// Restore clone to empty state, retaining our capacity and threshold
result.makeTable(table.length);
result.size = 0;
result.keySet = null;
result.entrySet = null;
result.values = null;
result.constructorPutAll(this);
return result;
}
代码示例来源:origin: com.bugvm/bugvm-rt
/**
* Returns a new {@code Hashtable} with the same key/value pairs, capacity
* and load factor.
*
* @return a shallow copy of this {@code Hashtable}.
* @see java.lang.Cloneable
*/
@SuppressWarnings("unchecked")
@Override public synchronized Object clone() {
/*
* This could be made more efficient. It unnecessarily hashes all of
* the elements in the map.
*/
Hashtable<K, V> result;
try {
result = (Hashtable<K, V>) super.clone();
} catch (CloneNotSupportedException e) {
throw new AssertionError(e);
}
// Restore clone to empty state, retaining our capacity and threshold
result.makeTable(table.length);
result.size = 0;
result.keySet = null;
result.entrySet = null;
result.values = null;
result.constructorPutAll(this);
return result;
}
代码示例来源:origin: ibinti/bugvm
/**
* Returns a new {@code Hashtable} with the same key/value pairs, capacity
* and load factor.
*
* @return a shallow copy of this {@code Hashtable}.
* @see java.lang.Cloneable
*/
@SuppressWarnings("unchecked")
@Override public synchronized Object clone() {
/*
* This could be made more efficient. It unnecessarily hashes all of
* the elements in the map.
*/
Hashtable<K, V> result;
try {
result = (Hashtable<K, V>) super.clone();
} catch (CloneNotSupportedException e) {
throw new AssertionError(e);
}
// Restore clone to empty state, retaining our capacity and threshold
result.makeTable(table.length);
result.size = 0;
result.keySet = null;
result.entrySet = null;
result.values = null;
result.constructorPutAll(this);
return result;
}
代码示例来源:origin: MobiVM/robovm
/**
* Returns a new {@code Hashtable} with the same key/value pairs, capacity
* and load factor.
*
* @return a shallow copy of this {@code Hashtable}.
* @see java.lang.Cloneable
*/
@SuppressWarnings("unchecked")
@Override public synchronized Object clone() {
/*
* This could be made more efficient. It unnecessarily hashes all of
* the elements in the map.
*/
Hashtable<K, V> result;
try {
result = (Hashtable<K, V>) super.clone();
} catch (CloneNotSupportedException e) {
throw new AssertionError(e);
}
// Restore clone to empty state, retaining our capacity and threshold
result.makeTable(table.length);
result.size = 0;
result.keySet = null;
result.entrySet = null;
result.values = null;
result.constructorPutAll(this);
return result;
}
代码示例来源:origin: com.jtransc/jtransc-rt
/**
* Returns a new {@code Hashtable} with the same key/value pairs, capacity
* and load factor.
*
* @return a shallow copy of this {@code Hashtable}.
* @see Cloneable
*/
@SuppressWarnings("unchecked")
@Override public synchronized Object clone() {
/*
* This could be made more efficient. It unnecessarily hashes all of
* the elements in the map.
*/
Hashtable<K, V> result;
try {
result = (Hashtable<K, V>) super.clone();
} catch (CloneNotSupportedException e) {
throw new AssertionError(e);
}
// Restore clone to empty state, retaining our capacity and threshold
result.makeTable(table.length);
result.size = 0;
result.keySet = null;
result.entrySet = null;
result.values = null;
result.constructorPutAll(this);
return result;
}
代码示例来源:origin: com.gluonhq/robovm-rt
/**
* Returns a new {@code Hashtable} with the same key/value pairs, capacity
* and load factor.
*
* @return a shallow copy of this {@code Hashtable}.
* @see java.lang.Cloneable
*/
@SuppressWarnings("unchecked")
@Override public synchronized Object clone() {
/*
* This could be made more efficient. It unnecessarily hashes all of
* the elements in the map.
*/
Hashtable<K, V> result;
try {
result = (Hashtable<K, V>) super.clone();
} catch (CloneNotSupportedException e) {
throw new AssertionError(e);
}
// Restore clone to empty state, retaining our capacity and threshold
result.makeTable(table.length);
result.size = 0;
result.keySet = null;
result.entrySet = null;
result.values = null;
result.constructorPutAll(this);
return result;
}
内容来源于网络,如有侵权,请联系作者删除!