updated javadoc for RedditPost.java

This commit is contained in:
Louis Vallat 2019-04-23 12:00:55 +02:00
parent 51bbc2fee6
commit 4f790f7c61

View File

@ -75,15 +75,16 @@ public abstract class RedditPost {
/** /**
* Main constructor for a Reddit post. * Main constructor for a Reddit post.
* @param id post's id
* @param title post's title * @param title post's title
* @param quarantine is this post in quarantine? * @param quarantine is this post in quarantine?
* @param score post's score * @param score post's score
* @param postHint * @param postHint post's hint
* @param crosspostable * @param crosspostable is post crosspostable?
* @param over18 * @param over18 is post NSFW?
* @param author * @param author post's author
* @param permalink * @param permalink post's permalink
* @param spoiler * @param spoiler is this post a spoiler?
*/ */
public RedditPost(String id, String title, boolean quarantine, double score, String postHint, boolean crosspostable, boolean over18, String author, String permalink, boolean spoiler) { public RedditPost(String id, String title, boolean quarantine, double score, String postHint, boolean crosspostable, boolean over18, String author, String permalink, boolean spoiler) {
this.postId = id; this.postId = id;
@ -98,42 +99,98 @@ public abstract class RedditPost {
this.spoiler = spoiler; this.spoiler = spoiler;
} }
/**
* Get post's title.
* @return post's title.
*/
public String getTitle() { public String getTitle() {
return title; return title;
} }
/**
* Is this post in quarantine?
* @return if the post is in quarantine.
*/
public boolean isQuarantine() { public boolean isQuarantine() {
return quarantine; return quarantine;
} }
/**
* Set quarantine state for the post.
* @param state the state to apply.
*/
public void setQuarantineState(boolean state) {
this.quarantine = state;
}
/**
* Get post's score.
* @return last known post's score.
*/
public double getScore() { public double getScore() {
return score; return score;
} }
/**
* Update post's score.
* @param newScore the new score.
*/
public void updateScore(int newScore) {
this.score = newScore;
}
/**
* Get post's hint.
* @return post's hint.
*/
public String getPostHint() { public String getPostHint() {
return postHint; return postHint;
} }
/**
* Is this post crosspostable?
* @return if the post is crosspostable.
*/
public boolean isCrosspostable() { public boolean isCrosspostable() {
return crosspostable; return crosspostable;
} }
/**
* Is this post NSFW?
* @return if the post is Not Safe For Work.
*/
public boolean isOver18() { public boolean isOver18() {
return over18; return over18;
} }
/**
* Get post's author.
* @return post's author.
*/
public String getAuthor() { public String getAuthor() {
return author; return author;
} }
/**
* Get post's permalink.
* @return the post's permalink.
*/
public String getPermalink() { public String getPermalink() {
return permalink; return permalink;
} }
/**
* Is this post a spoiler?
* @return if the post is a spoiler.
*/
public boolean isSpoiler() { public boolean isSpoiler() {
return spoiler; return spoiler;
} }
/**
* Get post's id.
* @return post's id.
*/
public String getPostId() { public String getPostId() {
return postId; return postId;
} }