Searched defs:hash (Results 1 - 22 of 22) sorted by relevance

/libcore/ojluni/src/main/java/java/util/
H A DObjects.java33 * null}-tolerant methods for computing the hash code of an object,
89 * Returns the hash code of a non-{@code null} argument and 0 for
93 * @return the hash code of a non-{@code null} argument and 0 for
102 * Generates a hash code for a sequence of input values. The hash
114 * return Objects.hash(x, y, z);
119 * value does not equal the hash code of that object reference.</b> This
123 * @return a hash value of the sequence of input values
127 public static int hash(Object... values) { method in class:Objects
H A DLinkedHashMap.java65 * provided to create a linked hash map whose order of iteration is the order
86 * <tt>remove</tt>), assuming the hash function disperses elements
95 * <p>A linked hash map has two parameters that affect its performance:
103 * If multiple threads access a linked hash map concurrently, and at least
115 * mappings or, in the case of access-ordered linked hash maps, affects
116 * iteration order. In insertion-ordered linked hash maps, merely changing
118 * a structural modification. <strong>In access-ordered linked hash maps,
179 * The iteration ordering method for this linked hash map: <tt>true</tt>
273 int index = indexFor(e.hash, newCapacity);
341 LinkedHashMapEntry(int hash, argument
443 addEntry(int hash, K key, V value, int bucketIndex) argument
483 createEntry(int hash, K key, V value, int bucketIndex) argument
[all...]
H A DHashtable.java35 * This class implements a hash table, which maps keys to values. Any
44 * <i>capacity</i> is the number of <i>buckets</i> in the hash table, and the
45 * <i>initial capacity</i> is simply the capacity at the time the hash table
46 * is created. Note that the hash table is <i>open</i>: in the case of a "hash
48 * sequentially. The <i>load factor</i> is a measure of how full the hash
135 * The hash table data.
140 * The total number of entries in the hash table.
171 private static int hash(Object k) { method in class:Hashtable
339 int hash
1059 int hash; field in class:Hashtable.HashtableEntry
1064 HashtableEntry(int hash, K key, V value, HashtableEntry<K,V> next) argument
[all...]
H A DIdentityHashMap.java35 * This class implements the <tt>Map</tt> interface with a hash table, using
66 * identity hash function ({@link System#identityHashCode(Object)})
73 * comprising the hash table. The precise relationship between the expected
79 * it pays to create identity hash maps with a sufficiently large expected
81 * time proportional to the number of buckets in the hash table, so it
86 * If multiple threads access an identity hash map concurrently, and at
118 * <p>Implementation note: This is a simple <i>linear-probe</i> hash table,
172 * The number of key-value mappings contained in this identity hash map.
208 * Constructs a new, empty identity hash map with a default expected
270 * Constructs a new identity hash ma
305 private static int hash(Object x, int length) { method in class:IdentityHashMap
[all...]
H A DWeakHashMap.java162 * The number of key-value mappings contained in this weak hash map.
172 * The load factor for the hash table.
290 * Returns index for hash code h.
304 int i = indexFor(e.hash, table.length);
383 if (e.hash == h && eq(k, e.get()))
412 while (e != null && !(e.hash == h && eq(k, e.get())))
436 if (h == e.hash && eq(k, e.get())) {
505 int i = indexFor(e.hash, dest.length);
552 * Removes the mapping for a key from this weak hash map if it is present.
581 if (h == e.hash
686 int hash; field in class:WeakHashMap.Entry
692 Entry(Object key, V value, ReferenceQueue<Object> queue, int hash, Entry<K,V> next) argument
[all...]
H A DHashMap.java44 * operations (<tt>get</tt> and <tt>put</tt>), assuming the hash function
54 * <i>capacity</i> is the number of buckets in the hash table, and the initial
55 * capacity is simply the capacity at the time the hash table is created. The
56 * <i>load factor</i> is a measure of how full the hash table is allowed to
58 * entries in the hash table exceeds the product of the load factor and the
59 * current capacity, the hash table is <i>rehashed</i> (that is, internal data
60 * structures are rebuilt) so that the hash table has approximately twice the
79 * If multiple threads access a hash map concurrently, and at least one of
175 * The load factor for the hash table.
303 * Returns index for hash cod
734 int hash; field in class:HashMap.HashMapEntry
806 addEntry(int hash, K key, V value, int bucketIndex) argument
824 createEntry(int hash, K key, V value, int bucketIndex) argument
[all...]
H A DLocale.java767 private final int hash; field in class:Locale.LocaleKey
773 // Calculate the hash value here because it's always used.
778 hash = h;
790 if (hash != other.hash || !base.equals(other.base)) {
801 return hash;
/libcore/ojluni/src/main/java/sun/util/calendar/
H A DEra.java135 private int hash = 0; field in class:Era
138 if (hash == 0) {
139 hash = name.hashCode() ^ abbr.hashCode() ^ (int)since ^ (int)(since >> 32)
142 return hash;
/libcore/luni/src/main/java/java/util/concurrent/
H A DExchanger.java179 * tried) to use randomized, prime-value-stepped, or double-hash
285 int hash; // Pseudo-random for spins field in class:Exchanger.Node
348 for (int h = p.hash, spins = SPINS;;) {
353 p.hash = h;
358 if (h == 0) // initialize hash
381 p.hash = h;
454 int h = p.hash;
484 p.hash = h;
H A DConcurrentHashMap.java48 * A hash table supporting full concurrency of retrievals and
69 * state of the hash table at some point at or since the creation of the
81 * collisions (i.e., keys that have distinct hash codes but fall into
87 * hash tables. However, resizing this or any other kind of hash
99 * hash table. To ameliorate impact, when keys are {@link Comparable},
242 * The primary design goal of this hash table is to maintain
249 * This map usually acts as a binned (bucketed) hash table. Each
251 * of the basic Node class with hash, key, value, and next
260 * because they have negative hash field
597 final int hash; field in class:ConcurrentHashMap.Node
602 Node(int hash, K key, V val, Node<K,V> next) argument
2696 TreeNode(int hash, K key, V val, Node<K,V> next, TreeNode<K,V> parent) argument
[all...]
/libcore/ojluni/src/main/java/sun/util/locale/
H A DBaseLocale.java47 private volatile int hash = 0; field in class:BaseLocale
154 int h = hash;
156 // Generating a hash value from language, script, region and variant
161 hash = h;
172 private final int hash; field in class:BaseLocale.Key
195 hash = h;
241 hash = h;
249 && this.hash == ((Key)obj).hash
273 return hash;
[all...]
/libcore/ojluni/src/main/java/sun/misc/
H A DSoftCache.java44 * soft references} to implement a memory-sensitive hash map. If the garbage
157 private Map hash; field in class:SoftCache
171 if (vc.isValid()) hash.remove(vc.key);
192 hash = new HashMap(initialCapacity, loadFactor);
205 hash = new HashMap(initialCapacity);
213 hash = new HashMap();
242 return ValueCell.strip(hash.get(key), false) != null;
287 Object v = hash.get(key);
291 hash.put(key, ValueCell.create(key, v, queue));
315 return ValueCell.strip(hash
[all...]
/libcore/ojluni/src/main/java/sun/security/ssl/
H A DSignatureAndHashAlgorithm.java44 * Signature and hash algorithm.
47 * indicate to the server which signature/hash algorithm pairs may be
60 * HashAlgorithm hash;
73 // supported pairs of signature and hash algorithm
77 // the hash algorithm
78 private HashAlgorithm hash; field in class:SignatureAndHashAlgorithm
96 private SignatureAndHashAlgorithm(HashAlgorithm hash, argument
98 this.hash = hash;
101 this.id = ((hash
119 valueOf(int hash, int signature, int sequence) argument
217 supports(HashAlgorithm hash, SignatureAlgorithm signature, String algorithm, int priority) argument
[all...]
/libcore/ojluni/src/main/java/sun/security/util/
H A DCache.java167 private volatile int hash; field in class:Cache.EqualByteArray
174 int h = hash;
180 hash = h;
/libcore/ojluni/src/main/java/java/lang/
H A DString.java122 /** Cache the hash code for the string */
123 private int hash; // Default to 0 field in class:String
1355 * Returns a hash code for this string. The hash code for a
1363 * (The hash value of the empty string is zero.)
1365 * @return a hash code value for this object.
1368 int h = hash;
1373 hash = h;
H A DThread.java1968 * saved value of the referent's identity hash code, to maintain
1969 * a consistent hash code after the referent has been cleared
1971 private final int hash; field in class:Thread.WeakClassKey
1979 hash = System.identityHashCode(cl);
1983 * Returns the identity hash code of the original referent.
1987 return hash;
2022 /** Probe hash value; nonzero if threadLocalRandomSeed initialized */
/libcore/ojluni/src/main/native/
H A Dzip_util.h172 * In-memory hash table cell.
176 * but merely remember a 32 bit hash.
179 unsigned int hash; /* 32 bit hashcode on name */ member in struct:jzcell
180 unsigned int next; /* hash chain: index into jzfile->entries */
225 jzcell *entries; /* array of hash cells */
228 jint tablelen; /* number of hash heads */
240 * Index representing end of hash chain
H A Dzip_util.c398 * Returns a hash code value for a C-style NUL-terminated string.
401 hash(const char *s) function
410 * Returns a hash code value for a string of a specified length.
436 hash_append(unsigned int hash, char c) argument
438 return ((int)hash)*31 + c;
722 /* Record the CEN offset and the name hash in our hash cell. */
724 entries[i].hash = hashN(entryName, nlen);
727 /* Add the entry to the hash table */
728 hsh = entries[i].hash
[all...]
/libcore/ojluni/src/main/java/java/io/
H A DObjectOutputStream.java2311 * Lightweight identity hash table which maps objects to integer handles,
2318 /* size threshold determining when to expand hash spine */
2322 /* maps hash value -> candidate handle value */
2364 int index = hash(obj) % spine.length;
2394 int index = hash(obj) % spine.length;
2401 * Expands the hash "spine" -- equivalent to increasing the number of
2402 * buckets in a conventional hash table.
2414 * Increases hash table capacity by lengthening entry arrays.
2428 * Returns hash value for given object.
2430 private int hash(Objec method in class:ObjectOutputStream.HandleTable
[all...]
H A DObjectStreamClass.java1797 long hash = 0;
1799 hash = (hash << 8) | (hashBytes[i] & 0xFF);
1801 return hash;
2176 private final int hash; field in class:ObjectStreamClass.FieldReflectorKey
2190 hash = System.identityHashCode(cl) + sigs.hashCode();
2194 return hash;
2321 * saved value of the referent's identity hash code, to maintain
2322 * a consistent hash code after the referent has been cleared
2324 private final int hash; field in class:ObjectStreamClass.WeakClassKey
[all...]
/libcore/luni/src/main/native/
H A Dorg_apache_harmony_xml_ExpatParser.cpp56 int hash; member in struct:InternedString
230 * Calculates a hash code for a null-terminated string. This is *not* equivalent
234 * @param s null-terminated string to hash
235 * @returns hash code
238 int hash = 0; local
241 hash = hash * 31 + *s++;
244 return hash;
252 * @param hash of bytes
255 static InternedString* newInternedString(JNIEnv* env, const char* bytes, int hash) { argument
349 findInternedString(InternedString** bucket, const char* s, int hash) argument
367 int hash = hashString(s); local
[all...]
/libcore/ojluni/src/main/java/java/net/
H A DURI.java497 private volatile transient int hash; // Zero ==> undefined field in class:URI
640 * <li><p> Finally, if a fragment is given then a hash character
715 * <li><p> Finally, if a fragment is given then a hash character
797 * <li><p> Finally, if a fragment is given then a hash character
1375 // -- Equality, comparison, hash code, toString, and serialization --
1450 * Returns a hash-code value for this URI. The hash code is based upon all
1454 * @return A hash-code value for this URI
1457 if (hash != 0)
1458 return hash;
1739 hash(int hash, String s) argument
1745 hashIgnoringCase(int hash, String s) argument
[all...]

Completed in 7549 milliseconds