Searched refs:HashCode (Results 1 - 25 of 32) sorted by relevance

12

/external/guava/guava/src/com/google/common/hash/
H A DHashFunction.java40 * 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
137 * HashCode hc = hf.newHasher()
157 HashCode hashLong(long input);
164 HashCode hashBytes(byte[] input);
174 HashCode hashBytes(byte[] input, int off, int len);
183 HashCode hashString(CharSequence input);
190 HashCode hashString(CharSequence input, Charset charset);
H A DHashCodes.java18 * 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...]
H A DHashCode.java30 public abstract class HashCode { class
31 HashCode() {} method in class:HashCode
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 {@code
H A DHashing.java154 public static long padToLong(HashCode hashCode) {
171 public static int consistentHash(HashCode hashCode, int buckets) {
220 public static HashCode combineOrdered(Iterable<HashCode> hashCodes) {
221 Iterator<HashCode> iterator = hashCodes.iterator();
225 for (HashCode hashCode : hashCodes) {
246 public static HashCode combineUnordered(Iterable<HashCode> hashCodes) {
247 Iterator<HashCode> iterator = hashCodes.iterator();
250 for (HashCode hashCod
[all...]
H A DAbstractStreamingHashFunction.java36 @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();
H A DHasher.java68 HashCode hash();
H A DAbstractCompositeHashFunction.java10 * {@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() {
H A DMurmur3_32HashFunction.java89 @Override public HashCode makeHash() {
H A DAbstractNonStreamingHashFunction.java101 public HashCode hash() {
H A DMessageDigestHashFunction.java168 public HashCode hash() {
H A DMurmur3_128HashFunction.java135 @Override public HashCode makeHash() {
/external/guava/guava-tests/test/com/google/common/hash/
H A DAbstractNonStreamingHashFunctionTest.java35 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) {
H A DHashingTest.java102 public void checkSameResult(HashCode hashCode, long equivLong) {
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);
151 HashCode hashCode2 = Hashing.combineOrdered(hashCodes);
166 Hashing.combineUnordered(Collections.<HashCode>emptySet());
181 HashCode hash31 = HashCodes.fromInt(31);
182 HashCode hash3
[all...]
H A DHashFunctionsTest.java38 * 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();
H A DHashCodesTest.java50 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) {
H A DAbstractStreamingHasherTest.java27 /** 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) {
H A DFunnelsTest.java53 @Override HashCode makeHash() { throw new UnsupportedOperationException(); }
/external/chromium_org/v8/test/cctest/compiler/
H A Dtest-operator.cc33 CHECK_EQ(17, op1.HashCode());
36 CHECK_EQ(18, op2.HashCode());
95 CHECK_EQ(op1a.HashCode(), op1b.HashCode());
100 CHECK_NE(op1a.HashCode(), op2a.HashCode());
101 CHECK_NE(op2a.HashCode(), op2b.HashCode());
165 CHECK_EQ(op1a.HashCode(), op1b.HashCode());
[all...]
/external/chromium_org/v8/src/compiler/
H A Doperator.h71 virtual int HashCode() const = 0;
117 virtual int HashCode() const FINAL { return opcode(); }
139 static int HashCode(T a) { return 0; } function in struct:v8::internal::compiler::StaticParameterTraits
151 static int HashCode(int a) { return a; } function in struct:v8::internal::compiler::StaticParameterTraits
161 static int HashCode(double a) { function in struct:v8::internal::compiler::StaticParameterTraits
175 static int HashCode(Unique<Object> a) { function in struct:v8::internal::compiler::StaticParameterTraits
187 static int HashCode(Unique<Name> a) { return static_cast<int>(a.Hashcode()); } function in struct:v8::internal::compiler::StaticParameterTraits
200 static int HashCode(Handle<Object> a) { function in struct:v8::internal::compiler::StaticParameterTraits
231 virtual int HashCode() const OVERRIDE {
232 return opcode() + 33 * StaticParameterTraits<T>::HashCode(thi
[all...]
H A Dvalue-numbering-reducer.cc15 size_t HashCode(Node* node) { return node->op()->HashCode(); } function in namespace:v8::internal::compiler::__anon17283
60 Entry** head = &buckets_[HashCode(node) % arraysize(buckets_)];
H A Dsimplified-operator.cc70 static int HashCode(const FieldAccess& val) { function in struct:v8::internal::compiler::StaticParameterTraits
87 static int HashCode(const ElementAccess& access) { function in struct:v8::internal::compiler::StaticParameterTraits
H A Djs-operator.h207 static int HashCode(ContextAccess val) { function in struct:v8::internal::compiler::StaticParameterTraits
223 static int HashCode(Runtime::FunctionId val) { return static_cast<int>(val); } function in struct:v8::internal::compiler::StaticParameterTraits
H A Dmachine-operator.cc38 static int HashCode(const StoreRepresentation& rep) { function in struct:v8::internal::compiler::StaticParameterTraits
53 static int HashCode(LoadRepresentation type) { return type; } function in struct:v8::internal::compiler::StaticParameterTraits
H A Dcommon-operator.cc46 static int HashCode(ExternalReference reference) { function in struct:v8::internal::compiler::StaticParameterTraits
/external/antlr/antlr-3.4/runtime/Delphi/Sources/Antlr3.Runtime/
H A DAntlr.Runtime.Tools.pas242 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) an
[all...]

Completed in 270 milliseconds

12