コード例 #1
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;
 }
コード例 #2
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;
  }
コード例 #3
0
 @Override
 public int hashCode() {
   int result = keys.hashCode();
   result = 31 * result + measures.hashCode();
   result = 31 * result + predicate.hashCode();
   return result;
 }
コード例 #4
0
 @Override
 public int hashCode() {
   final int prime = 31;
   int result = 1;
   result = prime * result + constructors.hashCode();
   result = prime * result + methods.hashCode();
   return result;
 }
コード例 #5
0
 @Override
 public int hashCode() {
   int result = myProject.hashCode();
   result = 31 * result + (myFile != null ? myFile.hashCode() : 0);
   result = 31 * result + myPsiElements.hashCode();
   result = 31 * result + myRangeMarkers.hashCode();
   result = 31 * result + mySerializedElements.hashCode();
   return result;
 }
コード例 #6
0
ファイル: JavaDatasetSuite.java プロジェクト: pallavipr/spark
 @Override
 public int hashCode() {
   int result = (a ? 1 : 0);
   result = 31 * result + b;
   result = 31 * result + Arrays.hashCode(c);
   result = 31 * result + Arrays.hashCode(d);
   result = 31 * result + e.hashCode();
   result = 31 * result + f.hashCode();
   return result;
 }
コード例 #7
0
  // Done inefficiently so as to exercise toArray
  static List clone(List s) {
    List a = Arrays.asList(s.toArray());
    if (s.hashCode() != a.hashCode()) fail("Incorrect hashCode computation.");

    List clone = newList();
    clone.addAll(a);
    if (!s.equals(clone)) fail("List not equal to copy.");
    if (!s.containsAll(clone)) fail("List does not contain copy.");
    if (!clone.containsAll(s)) fail("Copy does not contain list.");

    return clone;
  }
コード例 #8
0
 @Override
 public int hashCode() {
   final int prime = 31;
   int result = 1;
   result = prime * result + ((classes == null) ? 0 : classes.hashCode());
   result = prime * result + ((concentration == null) ? 0 : concentration.hashCode());
   result = prime * result + ((degree == null) ? 0 : degree.hashCode());
   result = prime * result + ((school == null) ? 0 : school.hashCode());
   result = prime * result + ((type == null) ? 0 : type.hashCode());
   result = prime * result + ((with == null) ? 0 : with.hashCode());
   result = prime * result + ((year == null) ? 0 : year.hashCode());
   return result;
 }
コード例 #9
0
ファイル: Test.java プロジェクト: cschenyuan/atella
 static void test04() {
   MyObject testReturn = new MyObject();
   List<String> list = testReturn.getTestList();
   System.out.println("At first return: " + list.hashCode());
   for (String str : list) {
     System.out.println(str);
   }
   list.add("modification");
   list = testReturn.getTestList();
   System.out.println("At second return: " + list.hashCode());
   for (String str : list) {
     System.out.println(str);
   }
 }
コード例 #10
0
 /** lists with same elements are equal and have same hashCode */
 public void testEquals() {
   List a = populatedArray(3);
   List b = populatedArray(3);
   assertTrue(a.equals(b));
   assertTrue(b.equals(a));
   assertEquals(a.hashCode(), b.hashCode());
   a.add(m1);
   assertFalse(a.equals(b));
   assertFalse(b.equals(a));
   b.add(m1);
   assertTrue(a.equals(b));
   assertTrue(b.equals(a));
   assertEquals(a.hashCode(), b.hashCode());
 }
コード例 #11
0
 /**
  * @return hash code of the instance
  * @author Klaus Meffert
  * @since 2.3
  */
 public int hashCode() {
   if (m_data.size() == 0) {
     return -29;
   } else {
     return m_data.hashCode();
   }
 }
コード例 #12
0
  @Override
  public int hashCode() {
    if (generics == null) return super.hashCode();

    int result = dataTypeIn.hashCode();
    result = 31 * result + generics.hashCode();
    return result;
  }
コード例 #13
0
 @Override
 public int hashCode() {
   final int prime = 31;
   int result = 1;
   result = prime * result + ((any == null) ? 0 : any.hashCode());
   result = prime * result + ((norm == null) ? 0 : norm.hashCode());
   result = prime * result + ((orig == null) ? 0 : orig.hashCode());
   return result;
 }
コード例 #14
0
 @Override
 public int hashCode() {
   final int prime = 31;
   int result = 1;
   result = prime * result + getOuterType().hashCode();
   result = prime * result + ((description == null) ? 0 : description.hashCode());
   result = prime * result + ((with == null) ? 0 : with.hashCode());
   return result;
 }
コード例 #15
0
 @Override
 public int hashCode() {
   int result = id != null ? id.hashCode() : 0;
   result = 31 * result + (ssn != null ? ssn.hashCode() : 0);
   result = 31 * result + (firstName != null ? firstName.hashCode() : 0);
   result = 31 * result + (lastName != null ? lastName.hashCode() : 0);
   result = 31 * result + (frequentFlyerMiles != null ? frequentFlyerMiles.hashCode() : 0);
   result = 31 * result + (picture != null ? Arrays.hashCode(picture) : 0);
   result = 31 * result + (dateOfBirth != null ? dateOfBirth.hashCode() : 0);
   result = 31 * result + age;
   result = 31 * result + (lastFlight != null ? lastFlight.hashCode() : 0);
   result = 31 * result + (passengerType != null ? passengerType.hashCode() : 0);
   result = 31 * result + (preferences != null ? preferences.hashCode() : 0);
   result = 31 * result + (cards != null ? cards.hashCode() : 0);
   result = 31 * result + (address != null ? address.hashCode() : 0);
   result = 31 * result + (tickets != null ? tickets.hashCode() : 0);
   return result;
 }
コード例 #16
0
 @Override
 public int hashCode() {
   final int prime = 31;
   int result = 1;
   result = prime * result + ((fecha == null) ? 0 : fecha.hashCode());
   result = prime * result + idOrdenDeCompra;
   result = prime * result + ((items == null) ? 0 : items.hashCode());
   result = prime * result + ((proveedor == null) ? 0 : proveedor.hashCode());
   return result;
 }
コード例 #17
0
ファイル: Track.java プロジェクト: Kmandr/jahspotify
 @Override
 public int hashCode() {
   int result = title != null ? title.hashCode() : 0;
   result = 31 * result + (artists != null ? artists.hashCode() : 0);
   result = 31 * result + (album != null ? album.hashCode() : 0);
   result = 31 * result + trackNumber;
   result = 31 * result + length;
   result = 31 * result + (cover != null ? cover.hashCode() : 0);
   result = 31 * result + (explicit ? 1 : 0);
   return result;
 }
コード例 #18
0
 @Override
 public int hashCode() {
   return _delegate.hashCode();
 }
コード例 #19
0
ファイル: PdfArray.java プロジェクト: adamrduffy/pjx
 public int hashCode() {
   return _a.hashCode();
 }
コード例 #20
0
ファイル: Sum.java プロジェクト: LVCPCAS/CASJava
 @Override
 public int hashCode() {
   return arguments != null ? arguments.hashCode() : 0;
 }
コード例 #21
0
ファイル: Group.java プロジェクト: ThrawnCA/boon
 @Override
 public int hashCode() {
   int result = expressions == null ? 0 : expressions.hashCode();
   if (grouping != null) result += grouping.hashCode();
   return result;
 }
コード例 #22
0
 @Override
 public int hashCode() {
   int result = packages != null ? packages.hashCode() : 0;
   result = 31 * result + (url != null ? url.hashCode() : 0);
   return result;
 }
コード例 #23
0
 @Override
 public int hashCode() {
   int result = name.hashCode();
   result = 31 * result + members.hashCode();
   return result;
 }
コード例 #24
0
 @Override
 public int hashCode() {
   return entries.hashCode();
 }
コード例 #25
0
ファイル: CheckerTestUtil.java プロジェクト: JetBrains/kotlin
 @Override
 public int hashCode() {
   int result = name.hashCode();
   result = 31 * result + (parameters != null ? parameters.hashCode() : 0);
   return result;
 }
 @Override
 public int hashCode() {
   return this.tags == null ? 0 : tags.hashCode();
 }
コード例 #27
0
 public int hashCode() {
   int result = files.hashCode();
   result = 31 * result + Arrays.hashCode(combinedHash);
   return result;
 }
コード例 #28
0
 @Override
 public int hashCode() {
   int result = usages.hashCode();
   result = 31 * result + names.hashCode();
   return result;
 }
コード例 #29
0
ファイル: Lexicon.java プロジェクト: kevinkissi/openccg
 public int hashCode() {
   return pred.hashCode() + ((coartRels != null) ? coartRels.hashCode() : 0);
 }
コード例 #30
0
ファイル: POSTaggerTester.java プロジェクト: QimingChen/NLP
 public int hashCode() {
   int result;
   result = (words != null ? words.hashCode() : 0);
   result = 29 * result + (tags != null ? tags.hashCode() : 0);
   return result;
 }