Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Nov 20th, 2018 80 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. public class Album {
  2.  
  3.     private ObjectId _id;
  4.  
  5.     private String artist;
  6.     private String title;
  7.     private List<Song> tracks;
  8.  
  9.     public ObjectId getId() {
  10.         return _id;
  11.     }
  12.  
  13.     public void setId(ObjectId id) {
  14.         this._id = id;
  15.     }
  16.  
  17.     ... Standard Accessors/Mutators ...
  18.  
  19.     @Override
  20.     public boolean equals(Object o) {
  21.         if (this == o) return true;
  22.         if (o == null || getClass() != o.getClass()) return false;
  23.  
  24.         Album album = (Album) o;
  25.  
  26.         if (!_id.equals(album._id)) return false;
  27.  
  28.         return true;
  29.     }
  30.  
  31.     @Override
  32.     public int hashCode() {
  33.         return _id.hashCode();
  34.     }
  35. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top