Created
March 10, 2018 14:44
-
-
Save SeungUkLee/d05247f73f03a27bfb235907fb6c8846 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public boolean equals(Object o) { | |
if (this == o) return true; | |
if (!(o instanceof Product)) return false; | |
Product that = (Product) o; | |
//that 이 proxyObject 일 수도 있으므로 getter 로 들고온다. | |
return Objects.equals(this.id, that.getId()) && | |
Objects.equals(this.name, that.getName()) && | |
Objects.equals(this.price, that.getPrice()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment