@Test public void notEqualOnNull() { assertFalse(ek.equals(null)); }
@Override public boolean equals(Object obj) { if (obj instanceof ExerciseKey) { ExerciseKey that = (ExerciseKey) obj; return Objects.equals(this.courseName, that.courseName) && Objects.equals(this.exerciseName, that.exerciseName); } else { return false; } }
ExerciseKey { @Override public boolean equals(Object obj) { if (obj instanceof ExerciseKey) { ExerciseKey that = (ExerciseKey) obj; return Objects.equals(this.courseName, that.courseName) && Objects.equals(this.exerciseName, that.exerciseName); } else { return false; } } }
ExerciseKey { @Override public boolean equals(Object obj) { if (obj instanceof ExerciseKey) { ExerciseKey that = (ExerciseKey) obj; return Objects.equals(this.courseName, that.courseName) && Objects.equals(this.exerciseName, that.exerciseName); } else { return false; } } ExerciseKey(String courseName, String exerciseName); }
ExerciseKey { @Override public boolean equals(Object obj) { if (obj instanceof ExerciseKey) { ExerciseKey that = (ExerciseKey) obj; return Objects.equals(this.courseName, that.courseName) && Objects.equals(this.exerciseName, that.exerciseName); } else { return false; } } ExerciseKey(String courseName, String exerciseName); String getCourseName(); String getExerciseName(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); }
ExerciseKey { @Override public boolean equals(Object obj) { if (obj instanceof ExerciseKey) { ExerciseKey that = (ExerciseKey) obj; return Objects.equals(this.courseName, that.courseName) && Objects.equals(this.exerciseName, that.exerciseName); } else { return false; } } ExerciseKey(String courseName, String exerciseName); String getCourseName(); String getExerciseName(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }