/external/guava/guava/src/com/google/common/hash/ |
HashFunction.java | 40 * represents a hash code as an instance of {@link HashCode}. 93 * and finally ask for the {@code HashCode} when finished using {@link Hasher#hash}. (See 111 * <h3>Relationship to {@link Object#hashCode}</h3> 115 * algorithms can't be easily substituted. Also, implementations of {@code hashCode} tend 117 * poor-quality {@code hashCode} implementations, including those in many JDK classes. 119 * <p>{@code Object.hashCode} implementations tend to be very fast, but have weak 124 * uses of hash functions beyond data structures, however, {@code Object.hashCode} almost 137 * HashCode hc = hf.newHasher() 157 HashCode hashLong(long input); 164 HashCode hashBytes(byte[] input) [all...] |
HashCodes.java | 18 * Static factories for {@link HashCode} instances. 26 * Creates a 32-bit {@code HashCode}, of which the bytes will form the passed int, interpreted 29 static HashCode fromInt(int hash) { 33 private static class IntHashCode extends HashCode { 57 throw new IllegalStateException("this HashCode only has 32 bits; cannot create a long"); 62 * Creates a 64-bit {@code HashCode}, of which the bytes will form the passed long, interpreted 65 static HashCode fromLong(long hash) { 69 private static class LongHashCode extends HashCode { 102 * Creates a {@code HashCode} from a byte array. The array is <i>not</i> copied defensively, 103 * so it must be handed-off so as to preserve the immutability contract of {@code HashCode} [all...] |
HashCode.java | 30 public abstract class HashCode { 31 HashCode() {} 34 * Returns the first four bytes of {@linkplain #asBytes() this hashcode's bytes}, converted to 40 * Returns the first eight bytes of {@linkplain #asBytes() this hashcode's bytes}, converted to 49 * changes to it will <i>not</i> be reflected in this {@code HashCode} object or any other arrays 78 if (object instanceof HashCode) { 79 HashCode that = (HashCode) object; 88 * Returns a "Java hash code" for this {@code HashCode} instance; this is well-defined 89 * (so, for example, you can safely put {@code HashCode} instances into a {@cod [all...] |
Hashing.java | 150 * If {@code hashCode} has enough bits, returns {@code hashCode.asLong()}, otherwise 151 * returns a {@code long} value with {@code hashCode.asInt()} as the least-significant 154 public static long padToLong(HashCode hashCode) { 155 return (hashCode.bits() < 64) ? UnsignedInts.toLong(hashCode.asInt()) : hashCode.asLong(); 159 * Assigns to {@code hashCode} a "bucket" in the range {@code [0, buckets)}, in a uniform 171 public static int consistentHash(HashCode hashCode, int buckets) [all...] |
AbstractStreamingHashFunction.java | 36 @Override public HashCode hashString(CharSequence input) { 40 @Override public HashCode hashString(CharSequence input, Charset charset) { 44 @Override public HashCode hashLong(long input) { 48 @Override public HashCode hashBytes(byte[] input) { 52 @Override public HashCode hashBytes(byte[] input, int off, int len) { 220 public final HashCode hash() { 229 abstract HashCode makeHash();
|
Hasher.java | 68 HashCode hash();
|
AbstractCompositeHashFunction.java | 10 * {@linkplain #makeHash(Hasher[])} that constructs the final {@code HashCode}. 22 * Constructs a {@code HashCode} from the {@code Hasher} objects of the functions. Each of them 23 * has consumed the entire input and they are ready to output a {@code HashCode}. The order of 26 // this could be cleaner if it passed HashCode[], but that would create yet another array... 27 /* protected */ abstract HashCode makeHash(Hasher[] hashers); 127 @Override public HashCode hash() {
|
Murmur3_32HashFunction.java | 89 @Override public HashCode makeHash() {
|
AbstractNonStreamingHashFunction.java | 101 public HashCode hash() {
|
MessageDigestHashFunction.java | 168 public HashCode hash() {
|
Murmur3_128HashFunction.java | 135 @Override public HashCode makeHash() {
|
/external/guava/guava-tests/test/com/google/common/hash/ |
AbstractNonStreamingHashFunctionTest.java | 35 HashCode[] codes = new HashCode[hashers.size()]; 55 HashCode makeHash() { 83 public HashCode hashBytes(byte[] input) { 88 public HashCode hashBytes(byte[] input, int off, int len) { 93 public HashCode hashString(CharSequence input) { 98 public HashCode hashString(CharSequence input, Charset charset) { 103 public HashCode hashLong(long input) {
|
HashingTest.java | 51 private void checkConsistentHashCorrectness(long hashCode) { 54 int b = Hashing.consistentHash(hashCode, shards); 102 public void checkSameResult(HashCode hashCode, long equivLong) { 103 assertEquals(Hashing.consistentHash(equivLong, 5555), Hashing.consistentHash(hashCode, 5555)); 116 Hashing.combineOrdered(Collections.<HashCode>emptySet()); 131 HashCode hash31 = HashCodes.fromInt(31); 132 HashCode hash32 = HashCodes.fromInt(32); 145 List<HashCode> hashCodes = Lists.newArrayList(); 149 HashCode hashCode1 = Hashing.combineOrdered(hashCodes) [all...] |
HashFunctionsTest.java | 38 * Checks that a Hasher returns the same HashCode when given the same input, and also 43 Set<HashCode> hashcodes = Sets.newHashSetWithExpectedSize(objects); 46 HashCode hashcode1 = hashFunction.newHasher().putObject(o, HashTestUtils.BAD_FUNNEL).hash(); 47 HashCode hashcode2 = hashFunction.newHasher().putObject(o, HashTestUtils.BAD_FUNNEL).hash();
|
HashCodesTest.java | 50 HashCode fromInt = HashCodes.fromInt(expected.asInt); 60 HashCode fromLong = HashCodes.fromLong(expected.asLong); 68 HashCode fromBytes = HashCodes.fromBytes(expected.bytes); 73 private void assertExpectedHashCode(ExpectedHashCode expected, HashCode hash) { 92 private void assertSideEffectFree(HashCode hash) { 99 private void assertReadableBytes(HashCode hashCode) { 100 assertTrue(hashCode.bits() >= 32); // sanity 101 byte[] hashBytes = hashCode.asBytes(); 102 int totalBytes = hashCode.bits() / 8 [all...] |
AbstractStreamingHasherTest.java | 27 /** Test we get the HashCode that is created by the sink. Later we ignore the result */ 170 @Override HashCode makeHash() { 220 public HashCode hashBytes(byte[] input) { 225 public HashCode hashBytes(byte[] input, int off, int len) { 235 public HashCode hashString(CharSequence input) { 240 public HashCode hashString(CharSequence input, Charset charset) { 245 public HashCode hashLong(long input) {
|
FunnelsTest.java | 53 @Override HashCode makeHash() { throw new UnsupportedOperationException(); }
|
/external/antlr/antlr-3.4/runtime/Delphi/Sources/Antlr3.Runtime/ |
Antlr.Runtime.Tools.pas | 242 HashCode: Integer; 256 function GetBucketIndex(const Key: TKey; HashCode: Integer): Integer; 258 procedure RehashAdd(HashCode: Integer; const Key: TKey; const Value: TValue); 259 procedure DoAdd(HashCode, Index: Integer; const Key: TKey; const Value: TValue); 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; 606 start := HashCode and (Length(FItems) - 1); 610 hc := FItems[Result].HashCode; 617 if (hc = HashCode) and FComparer.Equals(FItems[Result].Key, Key) the [all...] |
/external/chromium_org/third_party/sfntly/cpp/src/sample/chromium/ |
subsetter_impl.cc | 76 int32_t HashCode(int32_t platform_id, int32_t encoding_id, int32_t language_id, 119 int32_t hash_code = HashCode(name_table->PlatformId(i),
|
/external/sfntly/cpp/src/sample/chromium/ |
subsetter_impl.cc | 76 int32_t HashCode(int32_t platform_id, int32_t encoding_id, int32_t language_id, 119 int32_t hash_code = HashCode(name_table->PlatformId(i),
|
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/build/ |
BuildHelper.java | 44 import com.google.common.hash.HashCode; [all...] |
/external/droiddriver/libs/ |
guava-13.0.jar | |
/prebuilts/devtools/tools/lib/ |
guava-13.0.1.jar | |
/prebuilts/tools/common/gradle-plugins/repository/com/google/guava/guava/14.0/ |
guava-14.0.jar | |
/prebuilts/tools/common/guava-tools/ |
guava-13.0.1.jar | |