Skip to content

Commit 2aaf13e

Browse files
committed
Make some entities implement relevant interfaces
1 parent de626c8 commit 2aaf13e

3 files changed

Lines changed: 19 additions & 15 deletions

File tree

library/src/main/java/com/proxerme/library/connection/info/entity/Comment.java

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
import com.proxerme.library.interfaces.IdItem;
99
import com.proxerme.library.interfaces.ImageItem;
10+
import com.proxerme.library.interfaces.TimeItem;
1011
import com.proxerme.library.parameters.CommentStateParameter.CommentState;
1112
import com.squareup.moshi.Json;
1213

@@ -15,7 +16,7 @@
1516
*
1617
* @author Desnoo
1718
*/
18-
public class Comment implements Parcelable, IdItem, ImageItem {
19+
public class Comment implements Parcelable, IdItem, ImageItem, TimeItem {
1920

2021
public static final Creator<Comment> CREATOR = new Creator<Comment>() {
2122
@Override
@@ -65,19 +66,19 @@ private Comment() {
6566
/**
6667
* The constructor.
6768
*
68-
* @param id The comment id.
69-
* @param entryId The entry id.
70-
* @param userId The user id.
71-
* @param type The comment type.
72-
* @param state The comment state type {@link CommentState}
69+
* @param id The comment id.
70+
* @param entryId The entry id.
71+
* @param userId The user id.
72+
* @param type The comment type.
73+
* @param state The comment state type {@link CommentState}
7374
* @param ratingDetails The rating details.
74-
* @param comment The comment text.
75-
* @param rating The rating value.
76-
* @param episode The highest episode the user watched.
77-
* @param helpfulVotes The number of users that voted this comment up.
78-
* @param time The comment creation time.
79-
* @param username The name of the user.
80-
* @param imageId The image id.
75+
* @param comment The comment text.
76+
* @param rating The rating value.
77+
* @param episode The highest episode the user watched.
78+
* @param helpfulVotes The number of users that voted this comment up.
79+
* @param time The comment creation time.
80+
* @param username The name of the user.
81+
* @param imageId The image id.
8182
*/
8283
public Comment(@NonNull String id, @NonNull String entryId, @NonNull String userId,
8384
@NonNull String type, @CommentState int state,
@@ -222,6 +223,7 @@ public int getHelpfulVotes() {
222223
*
223224
* @return The Time.
224225
**/
226+
@Override
225227
public long getTime() {
226228
return time;
227229
}

library/src/main/java/com/proxerme/library/connection/info/entity/Entry.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
*
2424
* @author Ruben Gees
2525
*/
26-
public class Entry implements IdItem, Parcelable {
26+
public class Entry implements Parcelable, IdItem {
2727

2828
public static final Parcelable.Creator<Entry> CREATOR = new Parcelable.Creator<Entry>() {
2929
@Override

library/src/main/java/com/proxerme/library/connection/info/entity/Tag.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import android.support.annotation.NonNull;
66

77
import com.proxerme.library.interfaces.IdItem;
8+
import com.proxerme.library.interfaces.TimeItem;
89
import com.proxerme.library.util.Utils;
910
import com.squareup.moshi.Json;
1011

@@ -13,7 +14,7 @@
1314
*
1415
* @author Ruben Gees
1516
*/
16-
public class Tag implements IdItem, Parcelable {
17+
public class Tag implements Parcelable, IdItem, TimeItem {
1718

1819
public static final Parcelable.Creator<Tag> CREATOR = new Parcelable.Creator<Tag>() {
1920
@Override
@@ -103,6 +104,7 @@ public String getEntryId() {
103104
*
104105
* @return The time.
105106
*/
107+
@Override
106108
public long getTime() {
107109
return Utils.timestampToUnixTime(time);
108110
}

0 commit comments

Comments
 (0)