/external/guava/guava-tests/test/com/google/common/hash/ |
D | HashCodeTest.java | 80 HashCode fromInt = HashCode.fromInt(expected.asInt); in testFromInt() 90 HashCode fromLong = HashCode.fromLong(expected.asLong); in testFromLong() 98 HashCode fromBytes = HashCode.fromBytes(expected.bytes); in testFromBytes() 105 HashCode hashCode = HashCode.fromBytes(bytes); in testFromBytes_copyOccurs() 120 HashCode hashCode = HashCode.fromBytesNoCopy(bytes); in testFromBytesNoCopy_noCopyOccurs() 133 HashCode hashCode = HashCode.fromBytes(bytes); in testGetBytesInternal_noCloneOccurs() 145 assertEquals(0x1111111111111111L, HashCode.fromLong(0x1111111111111111L).padToLong()); in testPadToLong() 146 assertEquals(0x9999999999999999L, HashCode.fromLong(0x9999999999999999L).padToLong()); in testPadToLong() 147 assertEquals(0x0000000011111111L, HashCode.fromInt(0x11111111).padToLong()); in testPadToLong() 148 assertEquals(0x0000000099999999L, HashCode.fromInt(0x99999999).padToLong()); in testPadToLong() [all …]
|
D | HashingTest.java | 221 checkSameResult(HashCode.fromLong(1), 1); in testConsistentHash_ofHashCode() 222 checkSameResult(HashCode.fromLong(0x9999999999999999L), 0x9999999999999999L); in testConsistentHash_ofHashCode() 223 checkSameResult(HashCode.fromInt(0x99999999), 0x0000000099999999L); in testConsistentHash_ofHashCode() 226 public void checkSameResult(HashCode hashCode, long equivLong) { in checkSameResult() 255 Hashing.combineOrdered(Collections.<HashCode>emptySet()); in testCombineOrdered_empty() 263 HashCode unused = in testCombineOrdered_differentBitLengths() 264 Hashing.combineOrdered(ImmutableList.of(HashCode.fromInt(32), HashCode.fromLong(32L))); in testCombineOrdered_differentBitLengths() 271 HashCode hash31 = HashCode.fromInt(31); in testCombineOrdered() 272 HashCode hash32 = HashCode.fromInt(32); in testCombineOrdered() 275 HashCode.fromBytes(new byte[] {(byte) 0x80, 0, 0, 0}), in testCombineOrdered() [all …]
|
D | AbstractStreamingHasherTest.java | 47 HashCode unused = sink.hash(); in testBytes() 55 HashCode unused = sink.hash(); in testShort() 63 HashCode unused = sink.hash(); in testInt() 71 HashCode unused = sink.hash(); in testLong() 79 HashCode unused = sink.hash(); in testChar() 101 HashCode unused = sink.hash(); in testFloat() 109 HashCode unused = sink.hash(); in testDouble() 169 HashCode unused = sink.hash(); in testExhaustive() 201 protected HashCode makeHash() { in makeHash() 202 return HashCode.fromBytes(out.toByteArray()); in makeHash() [all …]
|
D | AbstractNonStreamingHashFunctionTest.java | 45 HashCode[] codes = new HashCode[hashers.size()]; in testExhaustive() 106 protected HashCode makeHash() { in newHasher() 107 return HashCode.fromBytes(out.toByteArray()); in newHasher() 134 public HashCode hashBytes(byte[] input, int off, int len) { in hashBytes() 135 return HashCode.fromBytes(Arrays.copyOfRange(input, off, off + len)); in hashBytes()
|
D | MacHashFunctionTest.java | 100 HashCode.fromBytes(mac.doFinal()), in testMultipleUpdates() 115 HashCode.fromBytes(mac.doFinal("!!!".getBytes(UTF_8))), in testMultipleUpdatesDoFinal() 181 assertEquals(knownOutput, HashCode.fromBytes(mac.doFinal()).toString()); in testEmptyInputs() 190 assertEquals(knownOutput, HashCode.fromBytes(mac.doFinal()).toString()); in testEmptyInputs_mixedAlgorithms() 201 assertEquals(knownOutput, HashCode.fromBytes(mac.doFinal()).toString()); in testKnownInputs() 202 assertEquals(knownOutput, HashCode.fromBytes(mac.doFinal(input.getBytes(UTF_8))).toString()); in testKnownInputs() 214 assertEquals(knownOutput, HashCode.fromBytes(mac.doFinal()).toString()); in testKnownInputs_mixedAlgorithms() 215 assertEquals(knownOutput, HashCode.fromBytes(mac.doFinal(input.getBytes(UTF_8))).toString()); in testKnownInputs_mixedAlgorithms() 283 assertEquals(HashCode.fromBytes(mac.doFinal()), hashFunc.hashBytes(input)); in assertMacHashing() 284 assertEquals(HashCode.fromBytes(mac.doFinal(input)), hashFunc.hashBytes(input)); in assertMacHashing() [all …]
|
D | Murmur3Hash128Test.java | 42 HashCode foxHash = in testKnownValues() 48 HashCode expected = toHashCode(expected1, expected2); in assertHash() 55 private static HashCode toHashCode(long... longs) { in toHashCode() 60 return HashCode.fromBytes(bb.array()); in toHashCode()
|
/external/guava/android/guava-tests/test/com/google/common/hash/ |
D | HashCodeTest.java | 80 HashCode fromInt = HashCode.fromInt(expected.asInt); in testFromInt() 90 HashCode fromLong = HashCode.fromLong(expected.asLong); in testFromLong() 98 HashCode fromBytes = HashCode.fromBytes(expected.bytes); in testFromBytes() 105 HashCode hashCode = HashCode.fromBytes(bytes); in testFromBytes_copyOccurs() 120 HashCode hashCode = HashCode.fromBytesNoCopy(bytes); in testFromBytesNoCopy_noCopyOccurs() 133 HashCode hashCode = HashCode.fromBytes(bytes); in testGetBytesInternal_noCloneOccurs() 145 assertEquals(0x1111111111111111L, HashCode.fromLong(0x1111111111111111L).padToLong()); in testPadToLong() 146 assertEquals(0x9999999999999999L, HashCode.fromLong(0x9999999999999999L).padToLong()); in testPadToLong() 147 assertEquals(0x0000000011111111L, HashCode.fromInt(0x11111111).padToLong()); in testPadToLong() 148 assertEquals(0x0000000099999999L, HashCode.fromInt(0x99999999).padToLong()); in testPadToLong() [all …]
|
D | HashingTest.java | 221 checkSameResult(HashCode.fromLong(1), 1); in testConsistentHash_ofHashCode() 222 checkSameResult(HashCode.fromLong(0x9999999999999999L), 0x9999999999999999L); in testConsistentHash_ofHashCode() 223 checkSameResult(HashCode.fromInt(0x99999999), 0x0000000099999999L); in testConsistentHash_ofHashCode() 226 public void checkSameResult(HashCode hashCode, long equivLong) { in checkSameResult() 255 Hashing.combineOrdered(Collections.<HashCode>emptySet()); in testCombineOrdered_empty() 263 HashCode unused = in testCombineOrdered_differentBitLengths() 264 Hashing.combineOrdered(ImmutableList.of(HashCode.fromInt(32), HashCode.fromLong(32L))); in testCombineOrdered_differentBitLengths() 271 HashCode hash31 = HashCode.fromInt(31); in testCombineOrdered() 272 HashCode hash32 = HashCode.fromInt(32); in testCombineOrdered() 275 HashCode.fromBytes(new byte[] {(byte) 0x80, 0, 0, 0}), in testCombineOrdered() [all …]
|
D | AbstractStreamingHasherTest.java | 47 HashCode unused = sink.hash(); in testBytes() 55 HashCode unused = sink.hash(); in testShort() 63 HashCode unused = sink.hash(); in testInt() 71 HashCode unused = sink.hash(); in testLong() 79 HashCode unused = sink.hash(); in testChar() 101 HashCode unused = sink.hash(); in testFloat() 109 HashCode unused = sink.hash(); in testDouble() 169 HashCode unused = sink.hash(); in testExhaustive() 201 protected HashCode makeHash() { in makeHash() 202 return HashCode.fromBytes(out.toByteArray()); in makeHash() [all …]
|
D | AbstractNonStreamingHashFunctionTest.java | 45 HashCode[] codes = new HashCode[hashers.size()]; in testExhaustive() 106 protected HashCode makeHash() { in newHasher() 107 return HashCode.fromBytes(out.toByteArray()); in newHasher() 134 public HashCode hashBytes(byte[] input, int off, int len) { in hashBytes() 135 return HashCode.fromBytes(Arrays.copyOfRange(input, off, off + len)); in hashBytes()
|
D | MacHashFunctionTest.java | 100 HashCode.fromBytes(mac.doFinal()), in testMultipleUpdates() 115 HashCode.fromBytes(mac.doFinal("!!!".getBytes(UTF_8))), in testMultipleUpdatesDoFinal() 181 assertEquals(knownOutput, HashCode.fromBytes(mac.doFinal()).toString()); in testEmptyInputs() 190 assertEquals(knownOutput, HashCode.fromBytes(mac.doFinal()).toString()); in testEmptyInputs_mixedAlgorithms() 201 assertEquals(knownOutput, HashCode.fromBytes(mac.doFinal()).toString()); in testKnownInputs() 202 assertEquals(knownOutput, HashCode.fromBytes(mac.doFinal(input.getBytes(UTF_8))).toString()); in testKnownInputs() 214 assertEquals(knownOutput, HashCode.fromBytes(mac.doFinal()).toString()); in testKnownInputs_mixedAlgorithms() 215 assertEquals(knownOutput, HashCode.fromBytes(mac.doFinal(input.getBytes(UTF_8))).toString()); in testKnownInputs_mixedAlgorithms() 283 assertEquals(HashCode.fromBytes(mac.doFinal()), hashFunc.hashBytes(input)); in assertMacHashing() 284 assertEquals(HashCode.fromBytes(mac.doFinal(input)), hashFunc.hashBytes(input)); in assertMacHashing() [all …]
|
D | Murmur3Hash128Test.java | 42 HashCode foxHash = in testKnownValues() 48 HashCode expected = toHashCode(expected1, expected2); in assertHash() 55 private static HashCode toHashCode(long... longs) { in toHashCode() 60 return HashCode.fromBytes(bb.array()); in toHashCode()
|
/external/guava/android/guava/src/com/google/common/hash/ |
D | HashFunction.java | 149 HashCode hashInt(int input); in hashInt() 156 HashCode hashLong(long input); in hashLong() 162 HashCode hashBytes(byte[] input); in hashBytes() 171 HashCode hashBytes(byte[] input, int off, int len); in hashBytes() 179 HashCode hashBytes(ByteBuffer input); in hashBytes() 194 HashCode hashUnencodedChars(CharSequence input); in hashUnencodedChars() 206 HashCode hashString(CharSequence input, Charset charset); in hashString() 214 <T> HashCode hashObject(T instance, Funnel<? super T> funnel); in hashObject()
|
D | HashCode.java | 37 public abstract class HashCode { class 38 HashCode() {} in HashCode() method in HashCode 108 abstract boolean equalsSameBits(HashCode that); in equalsSameBits() 116 public static HashCode fromInt(int hash) { in fromInt() 120 private static final class IntHashCode extends HashCode implements Serializable { 160 boolean equalsSameBits(HashCode that) { in equalsSameBits() 173 public static HashCode fromLong(long hash) { in fromLong() 177 private static final class LongHashCode extends HashCode implements Serializable { 226 boolean equalsSameBits(HashCode that) { in equalsSameBits() 239 public static HashCode fromBytes(byte[] bytes) { in fromBytes() [all …]
|
D | AbstractHashFunction.java | 32 public <T> HashCode hashObject(T instance, Funnel<? super T> funnel) { in hashObject() 37 public HashCode hashUnencodedChars(CharSequence input) { in hashUnencodedChars() 43 public HashCode hashString(CharSequence input, Charset charset) { in hashString() 48 public HashCode hashInt(int input) { in hashInt() 53 public HashCode hashLong(long input) { in hashLong() 58 public HashCode hashBytes(byte[] input) { in hashBytes() 63 public HashCode hashBytes(byte[] input, int off, int len) { in hashBytes() 69 public HashCode hashBytes(ByteBuffer input) { in hashBytes()
|
D | Hashing.java | 464 public static int consistentHash(HashCode hashCode, int buckets) { in consistentHash() 525 public static HashCode combineOrdered(Iterable<HashCode> hashCodes) { in combineOrdered() 526 Iterator<HashCode> iterator = hashCodes.iterator(); in combineOrdered() 530 for (HashCode hashCode : hashCodes) { in combineOrdered() 538 return HashCode.fromBytesNoCopy(resultBytes); in combineOrdered() 550 public static HashCode combineUnordered(Iterable<HashCode> hashCodes) { in combineUnordered() 551 Iterator<HashCode> iterator = hashCodes.iterator(); in combineUnordered() 554 for (HashCode hashCode : hashCodes) { in combineUnordered() 562 return HashCode.fromBytesNoCopy(resultBytes); in combineUnordered() 626 HashCode makeHash(Hasher[] hashers) { in makeHash() [all …]
|
D | AbstractNonStreamingHashFunction.java | 46 public HashCode hashInt(int input) { in hashInt() 51 public HashCode hashLong(long input) { in hashLong() 56 public HashCode hashUnencodedChars(CharSequence input) { in hashUnencodedChars() 66 public HashCode hashString(CharSequence input, Charset charset) { in hashString() 71 public abstract HashCode hashBytes(byte[] input, int off, int len); in hashBytes() 74 public HashCode hashBytes(ByteBuffer input) { in hashBytes() 105 public HashCode hash() { in hash()
|
D | ChecksumHashFunction.java | 77 public HashCode hash() { in hash() 85 return HashCode.fromInt((int) value); in hash() 87 return HashCode.fromLong(value); in hash()
|
/external/guava/guava/src/com/google/common/hash/ |
D | HashFunction.java | 149 HashCode hashInt(int input); in hashInt() 156 HashCode hashLong(long input); in hashLong() 162 HashCode hashBytes(byte[] input); in hashBytes() 171 HashCode hashBytes(byte[] input, int off, int len); in hashBytes() 179 HashCode hashBytes(ByteBuffer input); in hashBytes() 194 HashCode hashUnencodedChars(CharSequence input); in hashUnencodedChars() 206 HashCode hashString(CharSequence input, Charset charset); in hashString() 214 <T> HashCode hashObject(T instance, Funnel<? super T> funnel); in hashObject()
|
D | HashCode.java | 37 public abstract class HashCode { class 38 HashCode() {} in HashCode() method in HashCode 108 abstract boolean equalsSameBits(HashCode that); in equalsSameBits() 116 public static HashCode fromInt(int hash) { in fromInt() 120 private static final class IntHashCode extends HashCode implements Serializable { 160 boolean equalsSameBits(HashCode that) { in equalsSameBits() 173 public static HashCode fromLong(long hash) { in fromLong() 177 private static final class LongHashCode extends HashCode implements Serializable { 226 boolean equalsSameBits(HashCode that) { in equalsSameBits() 239 public static HashCode fromBytes(byte[] bytes) { in fromBytes() [all …]
|
D | AbstractHashFunction.java | 32 public <T> HashCode hashObject(T instance, Funnel<? super T> funnel) { in hashObject() 37 public HashCode hashUnencodedChars(CharSequence input) { in hashUnencodedChars() 43 public HashCode hashString(CharSequence input, Charset charset) { in hashString() 48 public HashCode hashInt(int input) { in hashInt() 53 public HashCode hashLong(long input) { in hashLong() 58 public HashCode hashBytes(byte[] input) { in hashBytes() 63 public HashCode hashBytes(byte[] input, int off, int len) { in hashBytes() 69 public HashCode hashBytes(ByteBuffer input) { in hashBytes()
|
D | Hashing.java | 464 public static int consistentHash(HashCode hashCode, int buckets) { in consistentHash() 525 public static HashCode combineOrdered(Iterable<HashCode> hashCodes) { in combineOrdered() 526 Iterator<HashCode> iterator = hashCodes.iterator(); in combineOrdered() 530 for (HashCode hashCode : hashCodes) { in combineOrdered() 538 return HashCode.fromBytesNoCopy(resultBytes); in combineOrdered() 550 public static HashCode combineUnordered(Iterable<HashCode> hashCodes) { in combineUnordered() 551 Iterator<HashCode> iterator = hashCodes.iterator(); in combineUnordered() 554 for (HashCode hashCode : hashCodes) { in combineUnordered() 562 return HashCode.fromBytesNoCopy(resultBytes); in combineUnordered() 626 HashCode makeHash(Hasher[] hashers) { in makeHash() [all …]
|
D | AbstractNonStreamingHashFunction.java | 46 public HashCode hashInt(int input) { in hashInt() 51 public HashCode hashLong(long input) { in hashLong() 56 public HashCode hashUnencodedChars(CharSequence input) { in hashUnencodedChars() 66 public HashCode hashString(CharSequence input, Charset charset) { in hashString() 71 public abstract HashCode hashBytes(byte[] input, int off, int len); in hashBytes() 74 public HashCode hashBytes(ByteBuffer input) { in hashBytes() 105 public HashCode hash() { in hash()
|
D | ChecksumHashFunction.java | 77 public HashCode hash() { in hash() 85 return HashCode.fromInt((int) value); in hash() 87 return HashCode.fromLong(value); in hash()
|
/external/antlr/runtime/Delphi/Sources/Antlr3.Runtime/ |
D | Antlr.Runtime.Tools.pas | 242 HashCode: Integer; 256 function GetBucketIndex(const Key: TKey; HashCode: Integer): Integer; in GetBucketIndex() 258 procedure RehashAdd(HashCode: Integer; const Key: TKey; const Value: TValue); 259 procedure DoAdd(HashCode, Index: Integer; const Key: TKey; const Value: TValue); argument 567 if oldItems[i].HashCode <> 0 then 568 RehashAdd(oldItems[i].HashCode, oldItems[i].Key, oldItems[i].Value); 599 function TDictionary<TKey,TValue>.GetBucketIndex(const Key: TKey; HashCode: Integer): Integer; in TDictionary() 606 start := HashCode and (Length(FItems) - 1); 610 hc := FItems[Result].HashCode; 617 if (hc = HashCode) and FComparer.Equals(FItems[Result].Key, Key) then [all …]
|