1 12 13 package org.eclipse.core.internal.databinding; 14 15 23 public class IdentityWrapper { 24 final Object o; 25 26 29 public IdentityWrapper(Object o) { 30 this.o = o; 31 } 32 33 36 public Object unwrap() { 37 return o; 38 } 39 40 public boolean equals(Object obj) { 41 if (obj == null || obj.getClass() != IdentityWrapper.class) { 42 return false; 43 } 44 return o == ((IdentityWrapper) obj).o; 45 } 46 47 public int hashCode() { 48 return System.identityHashCode(o); 49 } 50 } 51 | Popular Tags |