@Test public void ensureAlbumHashCodeWorks() { assertThat(album1.hashCode()).isEqualTo(album1_copy.hashCode()); assertThat(album1.hashCode()).isNotEqualTo(album2.hashCode()); }
@Override public int hashCode() { int result = identity != null ? identity.hashCode() : 0; result = 31 * result + (name != null ? name.hashCode() : 0); result = 31 * result + (artistName != null ? artistName.hashCode() : 0); result = 31 * result + songCount; result = 31 * result + (date != null ? date.hashCode() : 0); result = 31 * result + (artworkUri != null ? artworkUri.hashCode() : 0); return result; }
Album implements Bundleable { @Override public int hashCode() { int result = identity != null ? identity.hashCode() : 0; result = 31 * result + (name != null ? name.hashCode() : 0); result = 31 * result + (artistName != null ? artistName.hashCode() : 0); result = 31 * result + songCount; result = 31 * result + (date != null ? date.hashCode() : 0); result = 31 * result + (artworkUri != null ? artworkUri.hashCode() : 0); return result; } }
Album implements Bundleable { @Override public int hashCode() { int result = identity != null ? identity.hashCode() : 0; result = 31 * result + (name != null ? name.hashCode() : 0); result = 31 * result + (artistName != null ? artistName.hashCode() : 0); result = 31 * result + songCount; result = 31 * result + (date != null ? date.hashCode() : 0); result = 31 * result + (artworkUri != null ? artworkUri.hashCode() : 0); return result; } protected  Album(@NonNull String identity,
                    @NonNull String name,
                    @Nullable String artistName,
                    int songCount,
                    @Nullable String date,
                    @Nullable Uri artworkUri); }
Album implements Bundleable { @Override public int hashCode() { int result = identity != null ? identity.hashCode() : 0; result = 31 * result + (name != null ? name.hashCode() : 0); result = 31 * result + (artistName != null ? artistName.hashCode() : 0); result = 31 * result + songCount; result = 31 * result + (date != null ? date.hashCode() : 0); result = 31 * result + (artworkUri != null ? artworkUri.hashCode() : 0); return result; } protected  Album(@NonNull String identity,
                    @NonNull String name,
                    @Nullable String artistName,
                    int songCount,
                    @Nullable String date,
                    @Nullable Uri artworkUri); @Override String getIdentity(); @Override String getName(); @Override Bundle toBundle(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); static Builder builder(); }
Album implements Bundleable { @Override public int hashCode() { int result = identity != null ? identity.hashCode() : 0; result = 31 * result + (name != null ? name.hashCode() : 0); result = 31 * result + (artistName != null ? artistName.hashCode() : 0); result = 31 * result + songCount; result = 31 * result + (date != null ? date.hashCode() : 0); result = 31 * result + (artworkUri != null ? artworkUri.hashCode() : 0); return result; } protected  Album(@NonNull String identity,
                    @NonNull String name,
                    @Nullable String artistName,
                    int songCount,
                    @Nullable String date,
                    @Nullable Uri artworkUri); @Override String getIdentity(); @Override String getName(); @Override Bundle toBundle(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); static Builder builder(); final String identity; final String name; final String artistName; final int songCount; final String date; final Uri artworkUri; static final BundleCreator<Album> BUNDLE_CREATOR; }