Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 699 for HashCode (0.21 sec)

  1. android/guava/src/com/google/common/hash/HashCode.java

       * byte-based hashcode. Otherwise it returns {@link HashCode#asBytes}. Do <i>not</i> mutate this
       * array or else you will break the immutability contract of {@code HashCode}.
       */
      byte[] getBytesInternal() {
        return asBytes();
      }
    
      /**
       * Returns whether this {@code HashCode} and that {@code HashCode} have the same value, given that
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 20 18:43:59 GMT 2021
    - 12.6K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/hash/HashCodeTest.java

        assertEquals(expectedInt, hashCode.asInt());
        assertEquals(expectedToString, hashCode.toString());
    
        bytes[0] = (byte) 0x00;
    
        assertEquals(expectedInt, hashCode.asInt());
        assertEquals(expectedToString, hashCode.toString());
      }
    
      public void testFromBytesNoCopy_noCopyOccurs() {
        byte[] bytes = new byte[] {(byte) 0xcd, (byte) 0xab, (byte) 0x00, (byte) 0x00};
        HashCode hashCode = HashCode.fromBytesNoCopy(bytes);
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 13.1K bytes
    - Viewed (0)
  3. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/Certificate.kt

          }
        }
    
      // Avoid Long.hashCode(long) which isn't available on Android 5.
      override fun hashCode(): Int {
        var result = 0
        result = 31 * result + version.toInt()
        result = 31 * result + serialNumber.hashCode()
        result = 31 * result + signature.hashCode()
        result = 31 * result + issuer.hashCode()
        result = 31 * result + validity.hashCode()
        result = 31 * result + subject.hashCode()
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.4K bytes
    - Viewed (0)
  4. src/main/java/org/codelibs/core/collection/ArrayMap.java

        @Override
        public V put(final K key, final V value) {
            int hashCode = 0;
            int index = 0;
    
            if (key != null) {
                hashCode = key.hashCode();
                index = (hashCode & 0x7FFFFFFF) % mapTable.length;
                for (Entry<K, V> e = mapTable[index]; e != null; e = e.next) {
                    if (e.hashCode == hashCode && key.equals(e.key)) {
                        return swapValue(e, value);
    Java
    - Registered: Fri Apr 26 20:58:09 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 20.6K bytes
    - Viewed (1)
  5. android/guava-tests/test/com/google/common/base/ObjectsTest.java

        int h1 = Objects.hashCode(1, "two", 3.0);
        int h2 = Objects.hashCode(Integer.valueOf(1), new String("two"), Double.valueOf(3.0));
        // repeatable
        assertEquals(h1, h2);
    
        // These don't strictly need to be true, but they're nice properties.
        assertTrue(Objects.hashCode(1, 2, null) != Objects.hashCode(1, 2));
        assertTrue(Objects.hashCode(1, 2, null) != Objects.hashCode(1, null, 2));
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 21 18:32:41 GMT 2024
    - 2.3K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/hash/HashingTest.java

        checkSameResult(HashCode.fromLong(1), 1);
        checkSameResult(HashCode.fromLong(0x9999999999999999L), 0x9999999999999999L);
        checkSameResult(HashCode.fromInt(0x99999999), 0x0000000099999999L);
      }
    
      public void checkSameResult(HashCode hashCode, long equivLong) {
        assertEquals(Hashing.consistentHash(equivLong, 5555), Hashing.consistentHash(hashCode, 5555));
      }
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 26.5K bytes
    - Viewed (0)
  7. guava-testlib/test/com/google/common/testing/EqualsTesterTest.java

          assertErrorMessage(
              e,
              "the Object#hashCode ("
                  + a.hashCode()
                  + ") of "
                  + a
                  + " [group 1, item 1] must be equal to the Object#hashCode ("
                  + b.hashCode()
                  + ") of "
                  + b);
          return;
        }
        fail("Should get invalid hashCode error");
      }
    
      public void testNullEqualityGroup() {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Apr 17 15:49:06 GMT 2023
    - 12.9K bytes
    - Viewed (0)
  8. android/guava-tests/benchmark/com/google/common/collect/IteratorBenchmark.java

          for (int index = 0; index < size; index++) {
            sum += array[index].hashCode();
          }
        }
        return sum;
      }
    
      @Benchmark
      int arrayIndexedLength(int reps) {
        int sum = 0;
        for (int i = 0; i < reps; i++) {
          for (int index = 0; index < array.length; index++) {
            sum += array[index].hashCode();
          }
        }
        return sum;
      }
    
      @Benchmark
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.4K bytes
    - Viewed (0)
  9. maven-core/src/main/java/org/apache/maven/plugin/CacheUtils.java

            hash = hash * 31 + (plugin.isExtensions() ? 1 : 0);
    
            for (Dependency dependency : plugin.getDependencies()) {
                hash = hash * 31 + Objects.hashCode(dependency.getGroupId());
                hash = hash * 31 + Objects.hashCode(dependency.getArtifactId());
                hash = hash * 31 + Objects.hashCode(dependency.getVersion());
                hash = hash * 31 + Objects.hashCode(dependency.getType());
    Java
    - Registered: Sun Apr 28 03:35:10 GMT 2024
    - Last Modified: Wed Sep 06 08:39:32 GMT 2023
    - 4.5K bytes
    - Viewed (0)
  10. maven-core/src/main/java/org/apache/maven/plugin/DefaultExtensionRealmCache.java

                    ids.add(artifact.getVersion());
                }
    
                this.hashCode =
                        31 * files.hashCode() + 31 * ids.hashCode() + 31 * timestamps.hashCode() + 31 * sizes.hashCode();
            }
    
            @Override
            public int hashCode() {
                return hashCode;
            }
    
            @Override
            public boolean equals(Object o) {
                if (o == this) {
    Java
    - Registered: Sun Apr 28 03:35:10 GMT 2024
    - Last Modified: Mon Dec 26 15:12:32 GMT 2022
    - 4.7K bytes
    - Viewed (0)
Back to top