Created
May 18, 2018 14:19
-
-
Save ktisha/9a5af15ff7d5a8d819d3ee606d500d1f 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
public class Bean { | |
private String field; | |
public String getField() { | |
return field; | |
} | |
public synchronized void setField(String field) { | |
this.field = field; | |
} | |
public boolean equals(Object o) { | |
return ((Bean) o).field.equals(field); | |
} | |
public int hashCode() { | |
return field.hashCode(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment