FileDocCategorySizeDatePackage
IDKey.javaAPI DocApache Axis 1.41723Sat Apr 22 18:57:28 BST 2006org.apache.axis.utils

IDKey

public class IDKey extends Object
Wrap an identity key (System.identityHashCode())

Fields Summary
private Object
value
private int
id
Constructors Summary
public IDKey(Object _value)
Constructor for IDKey

param
_value


               
       
        // This is the Object hashcode 
        id = System.identityHashCode(_value);  
        // There have been some cases (bug 11706) that return the 
        // same identity hash code for different objects.  So 
        // the value is also added to disambiguate these cases.
        value = _value;
    
Methods Summary
public booleanequals(java.lang.Object other)
checks if instances are equal

param
other
return

        if (!(other instanceof IDKey)) {
            return false;
        }
        IDKey idKey = (IDKey) other;
        if (id != idKey.id) {
            return false;
        }
        // Note that identity equals is used.
        return value == idKey.value;
    
public inthashCode()
returns hashcode

return

       return id;