/** * Rehash via MurmurHash. * * <p>The implementation is based on the finalization step from Austin Appleby's <code> * MurmurHash3</code>. * * @see "http://sites.google.com/site/murmurhash/" */ private static int rehash(Object o) { int k = System.identityHashCode(o); k ^= k >>> 16; k *= 0x85ebca6b; k ^= k >>> 13; k *= 0xc2b2ae35; k ^= k >>> 16; return k; }
private static Object callObjectMethod(Object self, Method m, Object[] args) { assert (isObjectMethod(m)) : m; switch (m.getName()) { case "toString": return self.getClass().getName() + "@" + Integer.toHexString(self.hashCode()); case "hashCode": return System.identityHashCode(self); case "equals": return (self == args[0]); } return null; }
public int hashCode() { return System.identityHashCode(this); }
@Override public String toString() { return "Dom.Child(" + name + "," + System.identityHashCode(this) + ")"; }