Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 703 for hashCode (0.2 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/HashingTest.java

        Random random = new Random(7);
        List<HashCode> hashCodes = Lists.newArrayList();
        for (int i = 0; i < 10; i++) {
          hashCodes.add(HashCode.fromLong(random.nextLong()));
        }
        HashCode hashCode1 = Hashing.combineOrdered(hashCodes);
        Collections.shuffle(hashCodes, random);
        HashCode hashCode2 = Hashing.combineOrdered(hashCodes);
    
        assertFalse(hashCode1.equals(hashCode2));
      }
    
    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)
  3. guava-tests/test/com/google/common/hash/HashingTest.java

        Random random = new Random(7);
        List<HashCode> hashCodes = Lists.newArrayList();
        for (int i = 0; i < 10; i++) {
          hashCodes.add(HashCode.fromLong(random.nextLong()));
        }
        HashCode hashCode1 = Hashing.combineOrdered(hashCodes);
        Collections.shuffle(hashCodes, random);
        HashCode hashCode2 = Hashing.combineOrdered(hashCodes);
    
        assertFalse(hashCode1.equals(hashCode2));
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 26.5K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/hash/HashCodeTest.java

        bytesB[4] = (byte) 0xef;
    
        HashCode hashCodeA = HashCode.fromBytes(bytesA);
        HashCode hashCodeB = HashCode.fromBytes(bytesB);
    
        // They aren't equal...
        assertFalse(hashCodeA.equals(hashCodeB));
    
        // But they still have the same Object#hashCode() value.
        // Technically not a violation of the equals/hashCode contract, but...?
        assertEquals(hashCodeA.hashCode(), hashCodeB.hashCode());
      }
    
    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)
  5. guava-tests/test/com/google/common/hash/HashCodeTest.java

        bytesB[4] = (byte) 0xef;
    
        HashCode hashCodeA = HashCode.fromBytes(bytesA);
        HashCode hashCodeB = HashCode.fromBytes(bytesB);
    
        // They aren't equal...
        assertFalse(hashCodeA.equals(hashCodeB));
    
        // But they still have the same Object#hashCode() value.
        // Technically not a violation of the equals/hashCode contract, but...?
        assertEquals(hashCodeA.hashCode(), hashCodeB.hashCode());
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 13.1K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/hash/HashTestUtils.java

          HashCode hashcode1 = hashFunction.hashInt(value);
          HashCode hashcode2 = hashFunction.hashInt(value);
          Assert.assertEquals(hashcode1, hashcode2); // idempotent
          Assert.assertEquals(hashFunction.bits(), hashcode1.bits());
          Assert.assertEquals(hashFunction.bits(), hashcode1.asBytes().length * 8);
          hashcodes.add(hashcode1);
        }
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 25.3K bytes
    - Viewed (0)
  7. 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)
  8. 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 21 03:35:09 GMT 2024
    - Last Modified: Wed Sep 06 08:39:32 GMT 2023
    - 4.5K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/collect/AbstractMapEntryTest.java

        assertEquals(control("foo", 1).hashCode(), entry("foo", 1).hashCode());
        assertEquals(control("bar", 2).hashCode(), entry("bar", 2).hashCode());
      }
    
      public void testHashCodeNull() {
        assertEquals(control(NK, 1).hashCode(), entry(NK, 1).hashCode());
        assertEquals(control("bar", NV).hashCode(), entry("bar", NV).hashCode());
        assertEquals(control(NK, NV).hashCode(), entry(NK, NV).hashCode());
      }
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Feb 21 10:16:44 GMT 2024
    - 3.1K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/reflect/AbstractInvocationHandler.java

        return super.equals(obj);
      }
    
      /**
       * By default delegates to {@link Object#hashCode}. The dynamic proxies' {@code hashCode()} will
       * delegate to this method. Subclasses can override this method to provide custom equality.
       */
      @Override
      public int hashCode() {
        return super.hashCode();
      }
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Jan 05 17:43:40 GMT 2022
    - 5.2K bytes
    - Viewed (0)
Back to top