1 55 56 package org.jboss.axis.utils; 57 58 61 public class IDKey 62 { 63 private Object value = null; 64 private int id = 0; 65 66 71 public IDKey(Object _value) 72 { 73 id = System.identityHashCode(_value); 75 value = _value; 79 } 80 81 86 public int hashCode() 87 { 88 return id; 89 } 90 91 97 public boolean equals(Object other) 98 { 99 if (!(other instanceof IDKey)) 100 { 101 return false; 102 } 103 IDKey idKey = (IDKey)other; 104 if (id != idKey.id) 105 { 106 return false; 107 } 108 return value == idKey.value; 110 } 111 } 112 113 | Popular Tags |