Created
November 24, 2010 20:01
-
-
Save abyx/714291 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 Account { | |
| private final String name; | |
| private final int id; | |
| public Account(String name, int id) { | |
| this.name = name; | |
| this.id = id; | |
| } | |
| public int getId() { return id; } | |
| public String getName() { return name; } | |
| @Override public int hashCode() { | |
| // Standard implementation with "name" & "id" | |
| } | |
| @Override public boolean equals(Object obj) { | |
| // Standard implementation with "name" & "id" | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment