@Test public void testEquals() { assertEquals(movie1, movie1); assertEquals(movie1, movie7); assertFalse(movie1.equals("abc")); assertFalse(movie1.equals(movie2)); assertFalse(movie1.equals(movie3)); assertFalse(movie1.equals(movie4)); assertFalse(movie1.equals(movie5)); assertFalse(movie1.equals(movie6)); }
@Override public boolean equals(Object obj) { Movie m = null; boolean result = false; if (obj == this) { return true; } if (!(obj instanceof Movie)) { return false; } m = (Movie) obj; result = (name != null && name.equals(m.name)); result &= (year == m.year); result &= (genre != null && genre.equals(m.genre)); return result; }
Movie implements Serializable { @Override public boolean equals(Object obj) { Movie m = null; boolean result = false; if (obj == this) { return true; } if (!(obj instanceof Movie)) { return false; } m = (Movie) obj; result = (name != null && name.equals(m.name)); result &= (year == m.year); result &= (genre != null && genre.equals(m.genre)); return result; } }
Movie implements Serializable { @Override public boolean equals(Object obj) { Movie m = null; boolean result = false; if (obj == this) { return true; } if (!(obj instanceof Movie)) { return false; } m = (Movie) obj; result = (name != null && name.equals(m.name)); result &= (year == m.year); result &= (genre != null && genre.equals(m.genre)); return result; } Movie();  Movie(String name, short year, String fileExtension);  Movie(String name, short year, String genre, long filesize,
			String fileExtension); }
Movie implements Serializable { @Override public boolean equals(Object obj) { Movie m = null; boolean result = false; if (obj == this) { return true; } if (!(obj instanceof Movie)) { return false; } m = (Movie) obj; result = (name != null && name.equals(m.name)); result &= (year == m.year); result &= (genre != null && genre.equals(m.genre)); return result; } Movie();  Movie(String name, short year, String fileExtension);  Movie(String name, short year, String genre, long filesize,
			String fileExtension); String getName(); void setName(String name); short getYear(); void setYear(short year); String getGenre(); void setGenre(String genre); long getFilesize(); void setFilesize(long filesize); String getFileExtension(); void setFileExtension(String fileExtension); String getParent(); void setParent(String parent); @Override String toString(); @Override boolean equals(Object obj); @Override int hashCode(); }
Movie implements Serializable { @Override public boolean equals(Object obj) { Movie m = null; boolean result = false; if (obj == this) { return true; } if (!(obj instanceof Movie)) { return false; } m = (Movie) obj; result = (name != null && name.equals(m.name)); result &= (year == m.year); result &= (genre != null && genre.equals(m.genre)); return result; } Movie();  Movie(String name, short year, String fileExtension);  Movie(String name, short year, String genre, long filesize,
			String fileExtension); String getName(); void setName(String name); short getYear(); void setYear(short year); String getGenre(); void setGenre(String genre); long getFilesize(); void setFilesize(long filesize); String getFileExtension(); void setFileExtension(String fileExtension); String getParent(); void setParent(String parent); @Override String toString(); @Override boolean equals(Object obj); @Override int hashCode(); static final short UNKNOWN_RELEASE_YEAR; static final String UNKNOWN_GENRE; }