- public boolean isLikedReplyId(String replyId) {
- return likedReplyIds.contains(replyId);
- }
-
- /**
- * Adds the given reply ID to the list of replies this Sone likes.
- *
- * @param replyId
- * The ID of the reply
- * @return This Sone (for method chaining)
- */
- public synchronized Sone addLikedReplyId(String replyId) {
- likedReplyIds.add(replyId);
- return this;
- }
-
- /**
- * Removes the given post ID from the list of replies this Sone likes.
- *
- * @param replyId
- * The ID of the reply
- * @return This Sone (for method chaining)
- */
- public synchronized Sone removeLikedReplyId(String replyId) {
- likedReplyIds.remove(replyId);
- return this;
- }
-
- /**
- * Returns the albums of this Sone.
- *
- * @return The albums of this Sone
- */
- public List<Album> getAlbums() {
- return Collections.unmodifiableList(albums);
- }
-
- /**
- * Adds an album to this Sone.
- *
- * @param album
- * The album to add
- */
- public synchronized void addAlbum(Album album) {
- Validation.begin().isNotNull("Album", album).check().isEqual("Album Owner", album.getSone(), this).check();
- albums.add(album);
- }
-
- /**
- * Sets the albums of this Sone.
- *
- * @param albums
- * The albums of this Sone
- */
- public synchronized void setAlbums(Collection<? extends Album> albums) {
- Validation.begin().isNotNull("Albums", albums).check();
- this.albums.clear();
- for (Album album : albums) {
- addAlbum(album);
- }
- }
-
- /**
- * Removes an album from this Sone.
- *
- * @param album
- * The album to remove
- */
- public synchronized void removeAlbum(Album album) {
- Validation.begin().isNotNull("Album", album).check().isEqual("Album Owner", album.getSone(), this).check();
- albums.remove(album);
- }