Пример #1
0
 @Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (obj == null) return true;
   if (getClass() != obj.getClass()) return false;
   final Note other = (Note) obj;
   if (duration != other.duration) return false;
   if (!instrument.equals(other.instrument)) return false;
   if (!pitch.equals(other.pitch)) return false;
   return true;
 }