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

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

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

HashMap.hashCode介绍

暂无

代码示例

代码示例来源:origin: apache/rocketmq

@Override
public int hashCode() {
  final int prime = 31;
  int result = 1;
  result = prime * result + ((brokerAddrs == null) ? 0 : brokerAddrs.hashCode());
  result = prime * result + ((brokerName == null) ? 0 : brokerName.hashCode());
  return result;
}

代码示例来源:origin: alibaba/mdrill

@Override
public int hashCode() {
  return emitted.hashCode() + transferred.hashCode();
}

代码示例来源:origin: org.apache.poi/poi

@Override
public int hashCode() {
  return props.hashCode();
}

代码示例来源:origin: Sable/soot

public int hashCode() {
 return content_map.hashCode();
}

代码示例来源:origin: spring-projects/spring-framework

@Override
public int hashCode() {
  int result = super.hashCode();
  result = 31 * result + ObjectUtils.nullSafeHashCode(this.targetRequestPath);
  result = 31 * result + this.targetRequestParams.hashCode();
  return result;
}

代码示例来源:origin: apache/rocketmq

@Override
public int hashCode() {
  final int prime = 31;
  int result = 1;
  result = prime * result + ((brokerDatas == null) ? 0 : brokerDatas.hashCode());
  result = prime * result + ((orderTopicConf == null) ? 0 : orderTopicConf.hashCode());
  result = prime * result + ((queueDatas == null) ? 0 : queueDatas.hashCode());
  result = prime * result + ((filterServerTable == null) ? 0 : filterServerTable.hashCode());
  return result;
}

代码示例来源:origin: alibaba/mdrill

@Override
public int hashCode() {
  return common.hashCode() + acked.hashCode() + failed.hashCode()
      + process_latencies.hashCode();
}

代码示例来源:origin: alibaba/mdrill

@Override
public int hashCode() {
  return common.hashCode() + acked.hashCode() + failed.hashCode()
      + complete_latencies.hashCode();
}

代码示例来源:origin: org.springframework/spring-webmvc

@Override
public int hashCode() {
  int result = super.hashCode();
  result = 31 * result + ObjectUtils.nullSafeHashCode(this.targetRequestPath);
  result = 31 * result + this.targetRequestParams.hashCode();
  return result;
}

代码示例来源:origin: apache/hive

@Override
public int hashCode() {
 int result = typeInfo != null ? typeInfo.hashCode() : 0;
 result = 31 * result + (fieldInfos != null ? fieldInfos.hashCode() : 0);
 result = 31 * result + (fieldNames != null ? fieldNames.hashCode() : 0);
 result = 31 * result + (fields != null ? fields.hashCode() : 0);
 result = 31 * result + (fieldsByName != null ? fieldsByName.hashCode() : 0);
 result = 31 * result + (isRoot ? 1 : 0);
 return result;
}

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

@Override
  public synchronized int hashCode() {
    int result = stealerId;
    result = 31 * result + donorId;
    result = 31 * result + initialCluster.hashCode();
    result = 31 * result + (storeToPartitionIds != null ? storeToPartitionIds.hashCode() : 0);
    return result;
  }
}

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

@Override
public int hashCode() {
  final int prime = 31;
  int result = super.hashCode();
  result = prime * result + ((connectionProperties == null) ? 0 : connectionProperties.hashCode());
  result = prime * result + ((connectionUrl == null) ? 0 : connectionUrl.hashCode());
  result = prime * result + ((driver == null) ? 0 : driver.hashCode());
  result = prime * result + ((driverClass == null) ? 0 : driverClass.hashCode());
  result = prime * result + ((dataSourceClass == null) ? 0 : dataSourceClass.hashCode());
  result = prime * result + ((newConnectionSql == null) ? 0 : newConnectionSql.hashCode());
  result = prime * result + ((pool == null) ? 0 : pool.hashCode());
  return result;
}

代码示例来源:origin: apache/drill

@Override
public int hashCode() {
 int result = typeInfo != null ? typeInfo.hashCode() : 0;
 result = 31 * result + (fieldInfos != null ? fieldInfos.hashCode() : 0);
 result = 31 * result + (fieldNames != null ? fieldNames.hashCode() : 0);
 result = 31 * result + (fields != null ? fields.hashCode() : 0);
 result = 31 * result + (fieldsByName != null ? fieldsByName.hashCode() : 0);
 result = 31 * result + (isRoot ? 1 : 0);
 return result;
}

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

@Override
public int hashCode()
{
  final int prime = 31;
  int result = 1;
  result = prime * result + ((boolHashMap == null) ? 0 : boolHashMap.hashCode());
  result = prime * result + ((charHashMap == null) ? 0 : charHashMap.hashCode());
  result = prime * result + ((doubleHashMap == null) ? 0 : doubleHashMap.hashCode());
  result = prime * result + ((floatHashMap == null) ? 0 : floatHashMap.hashCode());
  result = prime * result + ((intHashMap == null) ? 0 : intHashMap.hashCode());
  result = prime * result + ((longHashMap == null) ? 0 : longHashMap.hashCode());
  result = prime * result + ((shortHashMap == null) ? 0 : shortHashMap.hashCode());
  return result;
}

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

@Override
public int hashCode()
{
  final int prime = 31;
  int result = 1;
  result = prime * result + ((boolHashMap == null) ? 0 : boolHashMap.hashCode());
  result = prime * result + ((charHashMap == null) ? 0 : charHashMap.hashCode());
  result = prime * result + ((doubleHashMap == null) ? 0 : doubleHashMap.hashCode());
  result = prime * result + ((floatHashMap == null) ? 0 : floatHashMap.hashCode());
  result = prime * result + ((intHashMap == null) ? 0 : intHashMap.hashCode());
  result = prime * result + ((longHashMap == null) ? 0 : longHashMap.hashCode());
  result = prime * result + ((shortHashMap == null) ? 0 : shortHashMap.hashCode());
  return result;
}
@Override

代码示例来源:origin: opentripplanner/OpenTripPlanner

+ new Double(waitAtBeginningFactor).hashCode() * 15485863
+ walkBoardCost + bikeBoardCost + bannedRoutes.hashCode()
+ bannedTrips.hashCode() * 1373 + transferSlack * 20996011
+ (int) nonpreferredTransferPenalty + (int) transferPenalty * 163013803
+ new Double(triangleSafetyFactor).hashCode() * 195233277

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

+ ((cArrayList == null) ? 0 : cArrayList.hashCode());
result = prime * result
    + ((cHashMap == null) ? 0 : cHashMap.hashCode());
result = prime * result
    + ((cHashMap2 == null) ? 0 : cHashMap2.hashCode());
result = prime * result + ((cList == null) ? 0 : cList.hashCode());
result = prime * result

代码示例来源:origin: apache/geode

assertEquals(hm, opMap);
assertEquals(opMap, hm);
assertEquals(hm.hashCode(), opMap.hashCode());

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

: concurrentSkipListMap.hashCode());
result = prime * result
    + ((hashMap == null) ? 0 : hashMap.hashCode());
result = prime * result
    + ((hashtable == null) ? 0 : hashtable.hashCode());

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

: concurrentSkipListMap.hashCode());
result = prime * result
    + ((hashMap == null) ? 0 : hashMap.hashCode());
result = prime * result
    + ((hashTable == null) ? 0 : hashTable.hashCode());

相关文章