@Test public void testSetPrivacy() throws Exception { assertFalse(mLibraryUpdate.containsModifications()); mLibraryUpdate.setPrivacy(mLibraryUpdate.getDefaults().isPrivate() ? Privacy.PRIVATE : Privacy.PUBLIC); assertFalse(mLibraryUpdate.containsModifications()); mLibraryUpdate.setPrivacy(mLibraryUpdate.isPrivate() ? Privacy.PUBLIC : Privacy.PRIVATE); assertTrue(mLibraryUpdate.containsModifications()); mLibraryUpdate.setPrivacy(mLibraryUpdate.getDefaults().isPrivate() ? Privacy.PRIVATE : Privacy.PUBLIC); assertFalse(mLibraryUpdate.containsModifications()); }
public void setPrivacy(final Privacy privacy) { if (Privacy.PRIVATE == privacy) { mIsPrivate = true; } else if (Privacy.PUBLIC == privacy) { mIsPrivate = false; } else { throw new IllegalArgumentException("privacy is an illegal value: " + privacy); } }
AnimeLibraryUpdate implements Parcelable { public void setPrivacy(final Privacy privacy) { if (Privacy.PRIVATE == privacy) { mIsPrivate = true; } else if (Privacy.PUBLIC == privacy) { mIsPrivate = false; } else { throw new IllegalArgumentException("privacy is an illegal value: " + privacy); } } }
AnimeLibraryUpdate implements Parcelable { public void setPrivacy(final Privacy privacy) { if (Privacy.PRIVATE == privacy) { mIsPrivate = true; } else if (Privacy.PUBLIC == privacy) { mIsPrivate = false; } else { throw new IllegalArgumentException("privacy is an illegal value: " + privacy); } } AnimeLibraryUpdate(final AnimeDigest digest);  AnimeLibraryUpdate(final AnimeLibraryEntry libraryEntry); private  AnimeLibraryUpdate(final Parcel source); }
AnimeLibraryUpdate implements Parcelable { public void setPrivacy(final Privacy privacy) { if (Privacy.PRIVATE == privacy) { mIsPrivate = true; } else if (Privacy.PUBLIC == privacy) { mIsPrivate = false; } else { throw new IllegalArgumentException("privacy is an illegal value: " + privacy); } } AnimeLibraryUpdate(final AnimeDigest digest);  AnimeLibraryUpdate(final AnimeLibraryEntry libraryEntry); private  AnimeLibraryUpdate(final Parcel source); boolean containsModifications(); String getAnimeId(); String getAnimeTitle(); Defaults getDefaults(); int getEpisodesWatched(); @Nullable String getNotes(); @Nullable Rating getRating(); int getRewatchCount(); @Nullable WatchingStatus getWatchingStatus(); boolean isPrivate(); boolean isRewatching(); void setEpisodesWatched(final int episodesWatched); void setNotes(@Nullable String notes); void setPrivacy(final Privacy privacy); void setRating(@Nullable final Rating rating); void setRewatchCount(final int rewatchCount); void setRewatching(final boolean rewatching); void setWatchingStatus(@Nullable final WatchingStatus watchingStatus); JsonObject toJson(); @Override int describeContents(); @Override void writeToParcel(final Parcel dest, final int flags); }
AnimeLibraryUpdate implements Parcelable { public void setPrivacy(final Privacy privacy) { if (Privacy.PRIVATE == privacy) { mIsPrivate = true; } else if (Privacy.PUBLIC == privacy) { mIsPrivate = false; } else { throw new IllegalArgumentException("privacy is an illegal value: " + privacy); } } AnimeLibraryUpdate(final AnimeDigest digest);  AnimeLibraryUpdate(final AnimeLibraryEntry libraryEntry); private  AnimeLibraryUpdate(final Parcel source); boolean containsModifications(); String getAnimeId(); String getAnimeTitle(); Defaults getDefaults(); int getEpisodesWatched(); @Nullable String getNotes(); @Nullable Rating getRating(); int getRewatchCount(); @Nullable WatchingStatus getWatchingStatus(); boolean isPrivate(); boolean isRewatching(); void setEpisodesWatched(final int episodesWatched); void setNotes(@Nullable String notes); void setPrivacy(final Privacy privacy); void setRating(@Nullable final Rating rating); void setRewatchCount(final int rewatchCount); void setRewatching(final boolean rewatching); void setWatchingStatus(@Nullable final WatchingStatus watchingStatus); JsonObject toJson(); @Override int describeContents(); @Override void writeToParcel(final Parcel dest, final int flags); static final Creator<AnimeLibraryUpdate> CREATOR; }