Skip to content

Instantly share code, notes, and snippets.

@ktisha
Created May 18, 2018 14:19
Show Gist options
  • Save ktisha/9a5af15ff7d5a8d819d3ee606d500d1f to your computer and use it in GitHub Desktop.
Save ktisha/9a5af15ff7d5a8d819d3ee606d500d1f to your computer and use it in GitHub Desktop.
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