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

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

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

Map.hashCode介绍

[英]Returns an integer hash code for the receiver. Objects which are equal return the same value for this method.
[中]返回接收器的整数哈希代码。相等的对象为此方法返回相同的值。

代码示例

代码示例来源:origin: apache/incubator-druid

@Override
public int hashCode()
{
 int result = columnTypes != null ? columnTypes.hashCode() : 0;
 result = 31 * result + (columnNames != null ? columnNames.hashCode() : 0);
 return result;
}

代码示例来源:origin: stanfordnlp/CoreNLP

@Override
public int hashCode() {
 int result = objects.hashCode();
 result = 31 * result + indexes.hashCode();
 return result;
}

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

@Override
public int hashCode() {
  int result = transformed.hashCode();
  result = 31 * result + failed.hashCode();
  result = 31 * result + unresolved.hashCode();
  return result;
}

代码示例来源:origin: org.testng/testng

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

代码示例来源:origin: apache/incubator-druid

@Override
public int hashCode()
{
 int result = pagingIdentifiers != null ? pagingIdentifiers.hashCode() : 0;
 result = 31 * result + (dimensions != null ? dimensions.hashCode() : 0);
 result = 31 * result + (metrics != null ? metrics.hashCode() : 0);
 result = 31 * result + (events != null ? events.hashCode() : 0);
 return result;
}

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

@Override
public int hashCode() {
 if (cachedHashCode != 0) {
  return cachedHashCode;
 }
 int result = instrumentedPackages.hashCode();
 result = 31 * result + instrumentedClasses.hashCode();
 result = 31 * result + classNameTranslations.hashCode();
 result = 31 * result + interceptedMethods.hashCode();
 result = 31 * result + classesToNotAcquire.hashCode();
 cachedHashCode = result;
 return result;
}

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

@Override
  public int hashCode() {
    int result = type.hashCode();
    result = 31 * result + properties.hashCode();
    result = 31 * result + componentBag.hashCode();
    result = 31 * result + newFeatureRegistrations.hashCode();
    result = 31 * result + enabledFeatures.hashCode();
    result = 31 * result + enabledFeatureClasses.hashCode();
    return result;
  }
}

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

@Override
  public int hashCode() {
    int result = type.hashCode();
    result = 31 * result + properties.hashCode();
    result = 31 * result + componentBag.hashCode();
    result = 31 * result + newFeatureRegistrations.hashCode();
    result = 31 * result + enabledFeatures.hashCode();
    result = 31 * result + enabledFeatureClasses.hashCode();
    return result;
  }
}

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

@Override
public int hashCode() {
  int result = name != null ? name.hashCode() : 0;
  result = 31 * result + (args != null ? args.hashCode() : 0);
  result = 31 * result + (subCommands != null ? subCommands.hashCode() : 0);
  result = 31 * result + (workingDirectory != null ? workingDirectory.hashCode() : 0);
  result = 31 * result + (test != null ? test.hashCode() : 0);
  result = 31 * result + (runIfConfig != null ? runIfConfig.hashCode() : 0);
  result = 31 * result + (onCancel != null ? onCancel.hashCode() : 0);
  return result;
}

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

@Override
  public int hashCode() {
    int result = map1.hashCode();
    result = 31 * result + list.hashCode();
    return result;
  }
}

代码示例来源:origin: aws/aws-sdk-java

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

代码示例来源:origin: aws/aws-sdk-java

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

代码示例来源:origin: aws/aws-sdk-java

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

代码示例来源:origin: aws/aws-sdk-java

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

代码示例来源:origin: aws/aws-sdk-java

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

代码示例来源:origin: aws/aws-sdk-java

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

代码示例来源:origin: aws/aws-sdk-java

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

代码示例来源:origin: aws/aws-sdk-java

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

代码示例来源:origin: aws/aws-sdk-java

@Override
public int hashCode() {
  final int prime = 31;
  int hashCode = 1;
  hashCode = prime * hashCode + ((getUserPoolId() == null) ? 0 : getUserPoolId().hashCode());
  hashCode = prime * hashCode + ((getProviderName() == null) ? 0 : getProviderName().hashCode());
  hashCode = prime * hashCode + ((getProviderDetails() == null) ? 0 : getProviderDetails().hashCode());
  hashCode = prime * hashCode + ((getAttributeMapping() == null) ? 0 : getAttributeMapping().hashCode());
  hashCode = prime * hashCode + ((getIdpIdentifiers() == null) ? 0 : getIdpIdentifiers().hashCode());
  return hashCode;
}

代码示例来源:origin: aws/aws-sdk-java

@Override
public int hashCode() {
  final int prime = 31;
  int hashCode = 1;
  hashCode = prime * hashCode + ((getCiphertextBlob() == null) ? 0 : getCiphertextBlob().hashCode());
  hashCode = prime * hashCode + ((getSourceEncryptionContext() == null) ? 0 : getSourceEncryptionContext().hashCode());
  hashCode = prime * hashCode + ((getDestinationKeyId() == null) ? 0 : getDestinationKeyId().hashCode());
  hashCode = prime * hashCode + ((getDestinationEncryptionContext() == null) ? 0 : getDestinationEncryptionContext().hashCode());
  hashCode = prime * hashCode + ((getGrantTokens() == null) ? 0 : getGrantTokens().hashCode());
  return hashCode;
}

相关文章