groovyx.gpars.extra166y
Class CustomConcurrentHashMap.EquivalenceUsingIdentity

java.lang.Object
  extended by groovyx.gpars.extra166y.CustomConcurrentHashMap.EquivalenceUsingIdentity
All Implemented Interfaces:
CustomConcurrentHashMap.Equivalence<java.lang.Object>, java.io.Serializable
Enclosing class:
CustomConcurrentHashMap<K,V>

static final class CustomConcurrentHashMap.EquivalenceUsingIdentity
extends java.lang.Object
implements CustomConcurrentHashMap.Equivalence<java.lang.Object>, java.io.Serializable


Field Summary
private static long serialVersionUID
           
 
Constructor Summary
CustomConcurrentHashMap.EquivalenceUsingIdentity()
           
 
Method Summary
 boolean equal(java.lang.Object a, java.lang.Object b)
          Returns true if the given objects are considered equal.
 int hash(java.lang.Object a)
          Returns a hash value such that equal(a, b) implies hash(a)==hash(b).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

CustomConcurrentHashMap.EquivalenceUsingIdentity

CustomConcurrentHashMap.EquivalenceUsingIdentity()
Method Detail

equal

public final boolean equal(java.lang.Object a,
                           java.lang.Object b)
Description copied from interface: CustomConcurrentHashMap.Equivalence
Returns true if the given objects are considered equal. This function must obey an equivalence relation: equal(a, a) is always true, equal(a, b) implies equal(b, a), and (equal(a, b) && equal(b, c) implies equal(a, c). Note that the second argument need not be known to have the same declared type as the first.

Specified by:
equal in interface CustomConcurrentHashMap.Equivalence<java.lang.Object>
Parameters:
a - a key in, or being placed in, the map
b - an object queried for membership
Returns:
true if considered equal

hash

public final int hash(java.lang.Object a)
Description copied from interface: CustomConcurrentHashMap.Equivalence
Returns a hash value such that equal(a, b) implies hash(a)==hash(b).

Specified by:
hash in interface CustomConcurrentHashMap.Equivalence<java.lang.Object>
Parameters:
a - an object queried for membership
Returns:
a hash value

Copyright © 2008–2012 Václav Pech. All Rights Reserved.