From f5b0a7c2749afc853a0b7c5b8945ae44120fc4a1 Mon Sep 17 00:00:00 2001 From: "Brian S. O'Neill" Date: Sun, 3 Sep 2006 23:23:51 +0000 Subject: More tests and fixes. --- .../amazon/carbonado/info/StorableIntrospector.java | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/main/java') diff --git a/src/main/java/com/amazon/carbonado/info/StorableIntrospector.java b/src/main/java/com/amazon/carbonado/info/StorableIntrospector.java index 1a015f4..ac3cd24 100644 --- a/src/main/java/com/amazon/carbonado/info/StorableIntrospector.java +++ b/src/main/java/com/amazon/carbonado/info/StorableIntrospector.java @@ -1527,6 +1527,26 @@ public class StorableIntrospector { return mAdapter; } + public int hashCode() { + return (getName().hashCode() * 31 + getType().hashCode()) * 31 + + getEnclosingType().hashCode(); + } + + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + + if (obj instanceof StorableProperty) { + StorableProperty other = (StorableProperty) obj; + return getName().equals(other.getName()) + && getType().equals(other.getType()) + && getEnclosingType().equals(other.getEnclosingType()); + } + + return false; + } + public String toString() { StringBuilder b = new StringBuilder(); try { -- cgit v1.2.3