summaryrefslogtreecommitdiffstats
path: root/sangria-lazy/src/main/java/com
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2015-07-10 21:45:41 -0400
committerTavian Barnes <tavianator@tavianator.com>2015-07-10 21:45:41 -0400
commit28fbf0859c63b2a30555b3295fe738c263c0db6b (patch)
treee3b73382eaa62e5ebb12063435e98b2c1eb9029e /sangria-lazy/src/main/java/com
parent2621acbb9115fe76f8638e4fdc838151353705b4 (diff)
downloadsangria-28fbf0859c63b2a30555b3295fe738c263c0db6b.tar.xz
lazy: Fix LazyBinder de-duplication.
Diffstat (limited to 'sangria-lazy/src/main/java/com')
-rw-r--r--sangria-lazy/src/main/java/com/tavianator/sangria/lazy/LazyBinder.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/sangria-lazy/src/main/java/com/tavianator/sangria/lazy/LazyBinder.java b/sangria-lazy/src/main/java/com/tavianator/sangria/lazy/LazyBinder.java
index 26d3848..baad5da 100644
--- a/sangria-lazy/src/main/java/com/tavianator/sangria/lazy/LazyBinder.java
+++ b/sangria-lazy/src/main/java/com/tavianator/sangria/lazy/LazyBinder.java
@@ -269,5 +269,22 @@ public class LazyBinder {
return visitor.visit(binding);
}
}
+
+ @Override
+ public boolean equals(Object obj) {
+ if (obj == this) {
+ return true;
+ } else if (!(obj instanceof LazyProvider)) {
+ return false;
+ }
+
+ LazyProvider<?> other = (LazyProvider<?>) obj;
+ return key.equals(other.key);
+ }
+
+ @Override
+ public int hashCode() {
+ return key.hashCode();
+ }
}
}