diff options
author | Colin Cross <ccross@android.com> | 2019-01-24 10:28:32 -0800 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2019-01-24 10:28:32 -0800 |
commit | 9268aadd478f66072573b0fe425014f42ced6cb0 (patch) | |
tree | fc48c84a601aa4170462d011afff6fb597364019 /java/com/google/turbine/binder/bound/ClassValue.java | |
parent | bd5271b08e24853993ac5df3e26e0f6272777d66 (diff) | |
parent | 6d5f9e3e611533de9397480f7b84277f47e6189b (diff) | |
download | turbine-9268aadd478f66072573b0fe425014f42ced6cb0.tar.gz |
Merge remote-tracking branch 'aosp/upstream-master' into master am: 3fec25b908
am: 6d5f9e3e61
Change-Id: I06d4da764fa8be08604a3e9e52ef6130106b1148
Diffstat (limited to 'java/com/google/turbine/binder/bound/ClassValue.java')
-rw-r--r-- | java/com/google/turbine/binder/bound/ClassValue.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/java/com/google/turbine/binder/bound/ClassValue.java b/java/com/google/turbine/binder/bound/ClassValue.java index e06fc8d..a75db42 100644 --- a/java/com/google/turbine/binder/bound/ClassValue.java +++ b/java/com/google/turbine/binder/bound/ClassValue.java @@ -18,6 +18,7 @@ package com.google.turbine.binder.bound; import com.google.turbine.model.Const; import com.google.turbine.type.Type; +import java.util.Objects; /** A class literal constant. */ public class ClassValue extends Const { @@ -42,4 +43,14 @@ public class ClassValue extends Const { public Type type() { return type; } + + @Override + public int hashCode() { + return Objects.hash(type); + } + + @Override + public boolean equals(Object obj) { + return obj instanceof ClassValue && type().equals(((ClassValue) obj).type()); + } } |