本文整理了Java中com.carrotsearch.hppc.ObjectIntHashMap.verifyLoadFactor()
方法的一些代码示例,展示了ObjectIntHashMap.verifyLoadFactor()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ObjectIntHashMap.verifyLoadFactor()
方法的具体详情如下:
包路径:com.carrotsearch.hppc.ObjectIntHashMap
类名称:ObjectIntHashMap
方法名:verifyLoadFactor
[英]Validate load factor range and return it. Override and suppress if you need insane load factors.
[中]验证负载系数范围并返回它。如果需要疯狂的负载系数,可以覆盖和抑制。
代码示例来源:origin: carrotsearch/hppc
/**
* New instance with the provided defaults.
*
* @param expectedElements
* The expected number of elements guaranteed not to cause a rehash (inclusive).
* @param loadFactor
* The load factor for internal buffers. Insane load factors (zero, full capacity)
* are rejected by {@link #verifyLoadFactor(double)}.
* @param orderMixer
* Hash key order mixing strategy. See {@link HashOrderMixing} for predefined
* implementations. Use constant mixers only if you understand the potential
* consequences.
*/
public ObjectIntHashMap(int expectedElements, double loadFactor, HashOrderMixingStrategy orderMixer) {
this.orderMixer = orderMixer;
this.loadFactor = verifyLoadFactor(loadFactor);
ensureCapacity(expectedElements);
}
代码示例来源:origin: harbby/presto-connectors
/**
* New instance with the provided defaults.
*
* @param expectedElements
* The expected number of elements guaranteed not to cause a rehash (inclusive).
* @param loadFactor
* The load factor for internal buffers. Insane load factors (zero, full capacity)
* are rejected by {@link #verifyLoadFactor(double)}.
* @param orderMixer
* Hash key order mixing strategy. See {@link HashOrderMixing} for predefined
* implementations. Use constant mixers only if you understand the potential
* consequences.
*/
public ObjectIntHashMap(int expectedElements, double loadFactor, HashOrderMixingStrategy orderMixer) {
this.orderMixer = orderMixer;
this.loadFactor = verifyLoadFactor(loadFactor);
ensureCapacity(expectedElements);
}
内容来源于网络,如有侵权,请联系作者删除!