1 16 17 package org.apache.axis.utils; 18 19 22 public class IDKey { 23 private Object value = null; 24 private int id = 0; 25 26 30 public IDKey(Object _value) { 31 id = System.identityHashCode(_value); 33 value = _value; 37 } 38 39 43 public int hashCode() { 44 return id; 45 } 46 47 52 public boolean equals(Object other) { 53 if (!(other instanceof IDKey)) { 54 return false; 55 } 56 IDKey idKey = (IDKey) other; 57 if (id != idKey.id) { 58 return false; 59 } 60 return value == idKey.value; 62 } 63 } 64 65 | Popular Tags |