java.util.HashMap.secondaryHash()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(6.0k)|赞(0)|评价(0)|浏览(108)

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

HashMap.secondaryHash介绍

暂无

代码示例

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

/**
 * Returns true if this map contains the specified mapping.
 */
private boolean containsMapping(Object key, Object value) {
  if (key == null) {
    HashMapEntry<K, V> e = entryForNullKey;
    return e != null && Objects.equal(value, e.value);
  }
  int hash = secondaryHash(key);
  HashMapEntry<K, V>[] tab = table;
  int index = hash & (tab.length - 1);
  for (HashMapEntry<K, V> e = tab[index]; e != null; e = e.next) {
    if (e.hash == hash && key.equals(e.key)) {
      return Objects.equal(value, e.value);
    }
  }
  return false; // No entry for key
}

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

int hash = secondaryHash(key);
HashMapEntry<K, V>[] tab = table;
int index = hash & (tab.length - 1);

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

return removeNullKey();
int hash = secondaryHash(key);
HashMapEntry<K, V>[] tab = table;
int index = hash & (tab.length - 1);

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

int hash = secondaryHash(key);
HashMapEntry<K, V>[] tab = table;
int index = hash & (tab.length - 1);

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

int hash = secondaryHash(key);
HashMapEntry<K, V>[] tab = table;
int index = hash & (tab.length - 1);

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

/**
 * Returns true if this map contains the specified mapping.
 */
private boolean containsMapping(Object key, Object value) {
  if (key == null) {
    HashMapEntry<K, V> e = entryForNullKey;
    return e != null && Objects.equals(value, e.value);
  }
  int hash = secondaryHash(key);
  HashMapEntry<K, V>[] tab = table;
  int index = hash & (tab.length - 1);
  for (HashMapEntry<K, V> e = tab[index]; e != null; e = e.next) {
    if (e.hash == hash && key.equals(e.key)) {
      return Objects.equals(value, e.value);
    }
  }
  return false; // No entry for key
}

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

/**
 * Returns true if this map contains the specified mapping.
 */
private boolean containsMapping(Object key, Object value) {
  if (key == null) {
    HashMapEntry<K, V> e = entryForNullKey;
    return e != null && Objects.equal(value, e.value);
  }
  int hash = secondaryHash(key);
  HashMapEntry<K, V>[] tab = table;
  int index = hash & (tab.length - 1);
  for (HashMapEntry<K, V> e = tab[index]; e != null; e = e.next) {
    if (e.hash == hash && key.equals(e.key)) {
      return Objects.equal(value, e.value);
    }
  }
  return false; // No entry for key
}

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

/**
 * Returns true if this map contains the specified mapping.
 */
private boolean containsMapping(Object key, Object value) {
  if (key == null) {
    HashMapEntry<K, V> e = entryForNullKey;
    return e != null && Objects.equal(value, e.value);
  }
  int hash = secondaryHash(key);
  HashMapEntry<K, V>[] tab = table;
  int index = hash & (tab.length - 1);
  for (HashMapEntry<K, V> e = tab[index]; e != null; e = e.next) {
    if (e.hash == hash && key.equals(e.key)) {
      return Objects.equal(value, e.value);
    }
  }
  return false; // No entry for key
}

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

/**
 * Returns true if this map contains the specified mapping.
 */
private boolean containsMapping(Object key, Object value) {
  if (key == null) {
    HashMapEntry<K, V> e = entryForNullKey;
    return e != null && Objects.equal(value, e.value);
  }
  int hash = secondaryHash(key);
  HashMapEntry<K, V>[] tab = table;
  int index = hash & (tab.length - 1);
  for (HashMapEntry<K, V> e = tab[index]; e != null; e = e.next) {
    if (e.hash == hash && key.equals(e.key)) {
      return Objects.equal(value, e.value);
    }
  }
  return false; // No entry for key
}

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

/**
 * Returns true if this map contains the specified mapping.
 */
private boolean containsMapping(Object key, Object value) {
  if (key == null) {
    HashMapEntry<K, V> e = entryForNullKey;
    return e != null && Objects.equal(value, e.value);
  }
  int hash = secondaryHash(key);
  HashMapEntry<K, V>[] tab = table;
  int index = hash & (tab.length - 1);
  for (HashMapEntry<K, V> e = tab[index]; e != null; e = e.next) {
    if (e.hash == hash && key.equals(e.key)) {
      return Objects.equal(value, e.value);
    }
  }
  return false; // No entry for key
}

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

/**
 * Returns true if this map contains the specified mapping.
 */
private boolean containsMapping(Object key, Object value) {
  if (key == null) {
    HashMapEntry<K, V> e = entryForNullKey;
    return e != null && Objects.equal(value, e.value);
  }
  int hash = secondaryHash(key);
  HashMapEntry<K, V>[] tab = table;
  int index = hash & (tab.length - 1);
  for (HashMapEntry<K, V> e = tab[index]; e != null; e = e.next) {
    if (e.hash == hash && key.equals(e.key)) {
      return Objects.equal(value, e.value);
    }
  }
  return false; // No entry for key
}

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

/**
 * Returns true if this map contains the specified mapping.
 */
private boolean containsMapping(Object key, Object value) {
  if (key == null) {
    HashMapEntry<K, V> e = entryForNullKey;
    return e != null && Objects.equal(value, e.value);
  }
  int hash = secondaryHash(key);
  HashMapEntry<K, V>[] tab = table;
  int index = hash & (tab.length - 1);
  for (HashMapEntry<K, V> e = tab[index]; e != null; e = e.next) {
    if (e.hash == hash && key.equals(e.key)) {
      return Objects.equal(value, e.value);
    }
  }
  return false; // No entry for key
}

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

int hash = secondaryHash(key);
HashMapEntry<K, V>[] tab = table;
int index = hash & (tab.length - 1);

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

return removeNullKey();
int hash = secondaryHash(key);
HashMapEntry<K, V>[] tab = table;
int index = hash & (tab.length - 1);

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

return removeNullKey();
int hash = secondaryHash(key);
HashMapEntry<K, V>[] tab = table;
int index = hash & (tab.length - 1);

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

return removeNullKey();
int hash = secondaryHash(key);
HashMapEntry<K, V>[] tab = table;
int index = hash & (tab.length - 1);

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

int hash = secondaryHash(key);
HashMapEntry<K, V>[] tab = table;
int index = hash & (tab.length - 1);

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

return removeNullKey();
int hash = secondaryHash(key);
HashMapEntry<K, V>[] tab = table;
int index = hash & (tab.length - 1);

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

int hash = secondaryHash(key);
HashMapEntry<K, V>[] tab = table;
int index = hash & (tab.length - 1);

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

int hash = secondaryHash(key);
HashMapEntry<K, V>[] tab = table;
int index = hash & (tab.length - 1);

相关文章