Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Album {
- private ObjectId _id;
- private String artist;
- private String title;
- private List<Song> tracks;
- public ObjectId getId() {
- return _id;
- }
- public void setId(ObjectId id) {
- this._id = id;
- }
- ... Standard Accessors/Mutators ...
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
- Album album = (Album) o;
- if (!_id.equals(album._id)) return false;
- return true;
- }
- @Override
- public int hashCode() {
- return _id.hashCode();
- }
- }
Add Comment
Please, Sign In to add comment