コード例 #1
1
 public int hashCode() {
   int result = myExtensionMappings.hashCode();
   result = 31 * result + myMatchingMappings.hashCode();
   result = 31 * result + myExactFileNameMappings.hashCode();
   result = 31 * result + myExactFileNameAnyCaseMappings.hashCode();
   return result;
 }
コード例 #2
1
 @Override
 public int hashCode() {
   int result = wordIndex != null ? wordIndex.hashCode() : 0;
   result = 31 * result + (wordFrequencies != null ? wordFrequencies.hashCode() : 0);
   result = 31 * result + (docFrequencies != null ? docFrequencies.hashCode() : 0);
   result = 31 * result + (vocabs != null ? vocabs.hashCode() : 0);
   result = 31 * result + (tokens != null ? tokens.hashCode() : 0);
   result = 31 * result + (totalWordOccurrences != null ? totalWordOccurrences.hashCode() : 0);
   result = 31 * result + numDocs;
   return result;
 }
コード例 #3
1
ファイル: StubRequest.java プロジェクト: soundcloud/stubby4j
  @Override
  public int hashCode() {
    int result = (ObjectUtils.isNotNull(url) ? url.hashCode() : 0);
    result = 31 * result + method.hashCode();
    result = 31 * result + (ObjectUtils.isNotNull(post) ? post.hashCode() : 0);
    result =
        31 * result
            + (ObjectUtils.isNotNull(fileBytes) && fileBytes.length != 0
                ? Arrays.hashCode(fileBytes)
                : 0);
    result = 31 * result + headers.hashCode();
    result = 31 * result + query.hashCode();

    return result;
  }
コード例 #4
1
ファイル: ViewQuery.java プロジェクト: rrva/Ektorp
 @Override
 public int hashCode() {
   final int prime = 31;
   int result = 1;
   result = prime * result + ((cachedQuery == null) ? 0 : cachedQuery.hashCode());
   result = prime * result + ((dbPath == null) ? 0 : dbPath.hashCode());
   result = prime * result + (descending ? 1231 : 1237);
   result = prime * result + ((designDocId == null) ? 0 : designDocId.hashCode());
   result = prime * result + ((endDocId == null) ? 0 : endDocId.hashCode());
   result = prime * result + ((endKey == null) ? 0 : endKey.hashCode());
   result = prime * result + (group ? 1231 : 1237);
   result = prime * result + groupLevel;
   result = prime * result + (ignoreNotFound ? 1231 : 1237);
   result = prime * result + (includeDocs ? 1231 : 1237);
   result = prime * result + (inclusiveEnd ? 1231 : 1237);
   result = prime * result + ((key == null) ? 0 : key.hashCode());
   result = prime * result + limit;
   result = prime * result + ((listName == null) ? 0 : listName.hashCode());
   result = prime * result + ((queryParams == null) ? 0 : queryParams.hashCode());
   result = prime * result + (reduce ? 1231 : 1237);
   result = prime * result + skip;
   result = prime * result + ((staleOk == null) ? 0 : staleOk.hashCode());
   result = prime * result + ((startDocId == null) ? 0 : startDocId.hashCode());
   result = prime * result + ((startKey == null) ? 0 : startKey.hashCode());
   result = prime * result + ((viewName == null) ? 0 : viewName.hashCode());
   return result;
 }
コード例 #5
1
 @Override
 public int hashCode() {
   int result = fields != null ? fields.hashCode() : 0;
   result = 31 * result + (type != null ? type.hashCode() : 0);
   result = 31 * result + (connections != null ? connections.hashCode() : 0);
   return result;
 }
コード例 #6
0
 @Override
 public int hashCode() {
   int result = riskLevelRules != null ? riskLevelRules.hashCode() : 0;
   result = 31 * result + (aggregator != null ? aggregator.hashCode() : 0);
   result = 31 * result + (aggregationConfig != null ? aggregationConfig.hashCode() : 0);
   return result;
 }
コード例 #7
0
ファイル: TestMap.java プロジェクト: jtransc/jtransc
  /** Tests Map.hashCode() */
  public void testMapHashCode() {
    resetEmpty();
    assertTrue("Empty maps have different hashCodes.", map.hashCode() == confirmed.hashCode());

    resetFull();
    assertTrue("Equal maps have different hashCodes.", map.hashCode() == confirmed.hashCode());
  }
コード例 #8
0
 @Override
 public int hashCode() {
   int result = id != null ? id.hashCode() : 0;
   result = 31 * result + (name != null ? name.hashCode() : 0);
   result = 31 * result + (url != null ? url.hashCode() : 0);
   result = 31 * result + (controllerUrl != null ? controllerUrl.hashCode() : 0);
   result = 31 * result + (controllerJson != null ? controllerJson.hashCode() : 0);
   result = 31 * result + (extractCmd != null ? extractCmd.hashCode() : 0);
   result = 31 * result + (offline ? 1 : 0);
   result =
       31 * result
           + (optionalDependencyPatterns != null
               ? Arrays.hashCode(optionalDependencyPatterns)
               : 0);
   result =
       31 * result
           + (excludeDependencyFilterPatterns != null
               ? Arrays.hashCode(excludeDependencyFilterPatterns)
               : 0);
   result = 31 * result + (mainClass != null ? mainClass.hashCode() : 0);
   result = 31 * result + (properties != null ? properties.hashCode() : 0);
   result = 31 * result + (environment != null ? environment.hashCode() : 0);
   result = 31 * result + (jvmOptions != null ? Arrays.hashCode(jvmOptions) : 0);
   result = 31 * result + (jarFiles != null ? jarFiles.hashCode() : 0);
   return result;
 }
コード例 #9
0
 public void testConstrainedMapLegal() {
   Map<String, Integer> map = Maps.newLinkedHashMap();
   Map<String, Integer> constrained = MapConstraints.constrainedMap(map, TEST_CONSTRAINT);
   map.put(TEST_KEY, TEST_VALUE);
   constrained.put("foo", 1);
   map.putAll(ImmutableMap.of("bar", 2));
   constrained.putAll(ImmutableMap.of("baz", 3));
   assertTrue(map.equals(constrained));
   assertTrue(constrained.equals(map));
   assertEquals(map.entrySet(), constrained.entrySet());
   assertEquals(map.keySet(), constrained.keySet());
   assertEquals(HashMultiset.create(map.values()), HashMultiset.create(constrained.values()));
   assertFalse(map.values() instanceof Serializable);
   assertEquals(map.toString(), constrained.toString());
   assertEquals(map.hashCode(), constrained.hashCode());
   ASSERT
       .that(map.entrySet())
       .has()
       .allOf(
           Maps.immutableEntry(TEST_KEY, TEST_VALUE),
           Maps.immutableEntry("foo", 1),
           Maps.immutableEntry("bar", 2),
           Maps.immutableEntry("baz", 3))
       .inOrder();
 }
コード例 #10
0
 @Override
 public int hashCode() {
   final int prime = 31;
   int result = 1;
   result = prime * result + ((managedSettings == null) ? 0 : managedSettings.hashCode());
   result = prime * result + ((userSettings == null) ? 0 : userSettings.hashCode());
   return result;
 }
コード例 #11
0
ファイル: RouteRule.java プロジェクト: cuittzq/dubbo-admin
 // 用Eclipse自动生成
 @Override
 public int hashCode() {
   final int prime = 31;
   int result = 1;
   result = prime * result + ((thenCondition == null) ? 0 : thenCondition.hashCode());
   result = prime * result + ((whenCondition == null) ? 0 : whenCondition.hashCode());
   return result;
 }
コード例 #12
0
ファイル: Message.java プロジェクト: ugli/jocote
 @Override
 public int hashCode() {
   int result = id != null ? id.hashCode() : 0;
   result = 31 * result + Arrays.hashCode(body);
   result = 31 * result + (headers != null ? headers.hashCode() : 0);
   result = 31 * result + (properties != null ? properties.hashCode() : 0);
   return result;
 }
コード例 #13
0
ファイル: ImmutableMapTest.java プロジェクト: CenxuiMia/guava
 public void testMutableValues() {
   IntHolder holderA = new IntHolder(1);
   IntHolder holderB = new IntHolder(2);
   Map<String, IntHolder> map = ImmutableMap.of("a", holderA, "b", holderB);
   holderA.value = 3;
   assertTrue(map.entrySet().contains(Maps.immutableEntry("a", new IntHolder(3))));
   Map<String, Integer> intMap = ImmutableMap.of("a", 3, "b", 2);
   assertEquals(intMap.hashCode(), map.entrySet().hashCode());
   assertEquals(intMap.hashCode(), map.hashCode());
 }
コード例 #14
0
 @Override
 public int hashCode() {
   final int prime = 31;
   int result = 1;
   result = prime * result + ((fields == null) ? 0 : fields.hashCode());
   result = prime * result + ((fieldsToDelete == null) ? 0 : fieldsToDelete.hashCode());
   result = prime * result + ((id == null) ? 0 : id.hashCode());
   result = prime * result + ((recordTypes == null) ? 0 : recordTypes.hashCode());
   result = prime * result + ((version == null) ? 0 : version.hashCode());
   return result;
 }
コード例 #15
0
ファイル: GitRepository.java プロジェクト: yurloc/guvnor
 @Override
 public int hashCode() {
   int result = environment.hashCode();
   result = 31 * result + (publicURIs.hashCode());
   result = 31 * result + (alias != null ? alias.hashCode() : 0);
   result = 31 * result + (root != null ? root.hashCode() : 0);
   result = 31 * result + (roles != null ? roles.hashCode() : 0);
   result = 31 * result + (branches != null ? branches.hashCode() : 0);
   result = 31 * result + (currentBranch != null ? currentBranch.hashCode() : 0);
   return result;
 }
コード例 #16
0
 @Override
 public synchronized int hashCode() {
   final int prime = 31;
   int result = 1;
   result = prime * result + ((backBuffer == null) ? 0 : backBuffer.hashCode());
   result = prime * result + epoch;
   result = prime * result + ((frontBuffer == null) ? 0 : frontBuffer.hashCode());
   result = prime * result + successfulExits;
   result = prime * result + unsuccessfulExits;
   result = prime * result + board.hashCode();
   return result;
 }
コード例 #17
0
  /** {@inheritDoc} */
  public int hashCode() {
    int result = 31;

    result += mappingRequired ? 7 : 0;
    result += domain != null ? 7 * domain.hashCode() : 7;
    result += defaultPrincipal != null ? 7 * defaultPrincipal.hashCode() : 7;
    result += defaultGroups != null ? 7 * defaultGroups.hashCode() : 7;
    result += userMappings != null ? 7 * userMappings.hashCode() : 7;
    result += groupMappings != null ? 7 * groupMappings.hashCode() : 7;

    return result;
  }
コード例 #18
0
ファイル: Request.java プロジェクト: jxqlovejava/rest.li
 /**
  * Computes the hashCode using the new fields
  *
  * @return
  */
 @Override
 public int hashCode() {
   int hashCode = _method.hashCode();
   hashCode = 31 * hashCode + (_inputRecord != null ? _inputRecord.hashCode() : 0);
   hashCode = 31 * hashCode + (_headers != null ? _headers.hashCode() : 0);
   hashCode = 31 * hashCode + (_baseUriTemplate != null ? _baseUriTemplate.hashCode() : 0);
   hashCode = 31 * hashCode + (_pathKeys != null ? _pathKeys.hashCode() : 0);
   hashCode = 31 * hashCode + (_resourceSpec != null ? _resourceSpec.hashCode() : 0);
   hashCode = 31 * hashCode + (_queryParams != null ? _queryParams.hashCode() : 0);
   hashCode = 31 * hashCode + (_methodName != null ? _methodName.hashCode() : 0);
   hashCode = 31 * hashCode + (_requestOptions != null ? _requestOptions.hashCode() : 0);
   return hashCode;
 }
コード例 #19
0
ファイル: Node.java プロジェクト: velankanisys/jclouds-chef
 @Override
 public int hashCode() {
   final int prime = 31;
   int result = 1;
   result = prime * result + ((_chefType == null) ? 0 : _chefType.hashCode());
   result = prime * result + ((_jsonClass == null) ? 0 : _jsonClass.hashCode());
   result = prime * result + ((automatic == null) ? 0 : automatic.hashCode());
   result = prime * result + ((defaultA == null) ? 0 : defaultA.hashCode());
   result = prime * result + ((name == null) ? 0 : name.hashCode());
   result = prime * result + ((normal == null) ? 0 : normal.hashCode());
   result = prime * result + ((override == null) ? 0 : override.hashCode());
   result = prime * result + ((runList == null) ? 0 : runList.hashCode());
   result = prime * result + ((chefEnvironment == null) ? 0 : chefEnvironment.hashCode());
   return result;
 }
コード例 #20
0
ファイル: ConfigBean.java プロジェクト: hifive/hifivetools
 /*
  * (非 Javadoc)
  *
  * @see java.lang.Object#hashCode()
  */
 @Override
 public int hashCode() {
   final int prime = 31;
   int result = 1;
   result = prime * result + ((externalLibPathList == null) ? 0 : externalLibPathList.hashCode());
   result = prime * result + ((filterList == null) ? 0 : filterList.hashCode());
   result = prime * result + ((internalLibPathList == null) ? 0 : internalLibPathList.hashCode());
   result = prime * result + ((jsHintOptionList == null) ? 0 : jsHintOptionList.hashCode());
   result = prime * result + ((jsLintOptionList == null) ? 0 : jsLintOptionList.hashCode());
   result = prime * result + ((jsLintPath == null) ? 0 : jsLintPath.hashCode());
   result = prime * result + ((optionFilePath == null) ? 0 : optionFilePath.hashCode());
   result = prime * result + ((otherProjectPath == null) ? 0 : otherProjectPath.hashCode());
   result = prime * result + (useOtherProject ? 1231 : 1237);
   return result;
 }
コード例 #21
0
 @Override
 public int hashCode() {
   int result = type.hashCode();
   result = 31 * result + context.hashCode();
   result = 31 * result + attributes.hashCode();
   return result;
 }
コード例 #22
0
ファイル: ClassNode.java プロジェクト: JamesTryand/gravel
 @Override
 public int hashCode() {
   return ((((super.hashCode() ^ (_name == null ? 0 : _name.hashCode()))
               ^ java.util.Arrays.hashCode(_namespace))
           ^ _superclassPath.hashCode())
       ^ _properties.hashCode());
 }
コード例 #23
0
ファイル: MapConfig.java プロジェクト: ItsMadPig/samza
 @Override
 public int hashCode() {
   final int prime = 31;
   int result = 1;
   result = prime * result + ((map == null) ? 0 : map.hashCode());
   return result;
 }
コード例 #24
0
ファイル: HstSitePipeline.java プロジェクト: srajeev/hippo
 @Override
 public int hashCode() {
   if (hashCode == 0) {
     hashCode = linkedKeyFragments.hashCode();
   }
   return hashCode;
 }
コード例 #25
0
 @Override
 public int hashCode() {
   int result = name != null ? name.hashCode() : 0;
   result = 31 * result + factoryClassName.hashCode();
   result = 31 * result + (params != null ? params.hashCode() : 0);
   return result;
 }
コード例 #26
0
 private int determineHashCode() {
   int result = alias != null ? alias.hashCode() : 0;
   result = 31 * result + (getClass().getName().hashCode());
   result = 31 * result + (lockMode != null ? lockMode.hashCode() : 0);
   result = 31 * result + (propertyResults != null ? propertyResults.hashCode() : 0);
   return result;
 }
コード例 #27
0
ファイル: TestMap.java プロジェクト: jtransc/jtransc
 protected void verifyMap() {
   int size = confirmed.size();
   boolean empty = confirmed.isEmpty();
   assertEquals("Map should be same size as HashMap", size, map.size());
   assertEquals("Map should be empty if HashMap is", empty, map.isEmpty());
   assertEquals("hashCodes should be the same", confirmed.hashCode(), map.hashCode());
   // this fails for LRUMap because confirmed.equals() somehow modifies
   // map, causing concurrent modification exceptions.
   // assertEquals("Map should still equal HashMap", confirmed, map);
   // this works though and performs the same verification:
   assertTrue("Map should still equal HashMap", map.equals(confirmed));
   // TODO: this should really be rexamined to figure out why LRU map
   // behaves like it does (the equals shouldn't modify since all accesses
   // by the confirmed collection should be through an iterator, thus not
   // causing LRUMap to change).
 }
コード例 #28
0
 @Override
 public int hashCode() {
   int result = pendingValues != null ? pendingValues.hashCode() : 0;
   result = 31 * result + (bookedInstances != null ? bookedInstances.hashCode() : 0);
   result = 31 * result + (paxosInstances != null ? paxosInstances.hashCode() : 0);
   return result;
 }
コード例 #29
0
 @Override
 public int hashCode() {
   final int prime = 31;
   int result = 1;
   result = prime * result + properties.hashCode();
   return result;
 }
コード例 #30
0
ファイル: NodeInfo.java プロジェクト: yangwei888/structr
  private void calcHashCode() {

    this.hashCode = 13;

    hashCode += types.hashCode();
    hashCode += properties.hashCode() * 31;
  }