summaryrefslogtreecommitdiff
path: root/src/main/java/com/amazon/carbonado/info
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/amazon/carbonado/info')
-rw-r--r--src/main/java/com/amazon/carbonado/info/StorableIntrospector.java20
1 files changed, 20 insertions, 0 deletions
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 {