Package com.jcabi.github
Class Comment.Smart
- java.lang.Object
-
- com.jcabi.github.Comment.Smart
-
- All Implemented Interfaces:
Comment,JsonPatchable,JsonReadable,Comparable<Comment>
- Enclosing interface:
- Comment
@Immutable @Loggable(1) public static final class Comment.Smart extends Object implements Comment
Smart comment with additional features.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.jcabi.github.Comment
Comment.Smart
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Userauthor()Get its author.Stringbody()Get its body.voidbody(String text)Change comment body.intcompareTo(Comment obj)DatecreatedAt()When this comment was created.Issueissue()The issue it's in.javax.json.JsonObjectjson()Describe it in a JSON object.intnumber()Number.voidpatch(javax.json.JsonObject json)Patch using this JSON object.voidreact(Reaction reaction)Adds the reaction to the comment.Collection<Reaction>reactions()List the reactions of the comment.voidremove()Delete the comment.DateupdatedAt()When this comment was updated last time.URLurl()Get its URL.
-
-
-
Constructor Detail
-
Smart
public Smart(Comment cmt)
Public ctor.- Parameters:
cmt- Comment
-
-
Method Detail
-
author
public User author() throws IOException
Get its author.- Returns:
- Author of comment
- Throws:
IOException- If there is any I/O problem
-
body
public String body() throws IOException
Get its body.- Returns:
- Body of comment
- Throws:
IOException- If there is any I/O problem
-
body
public void body(String text) throws IOException
Change comment body.- Parameters:
text- Body of comment- Throws:
IOException- If there is any I/O problem
-
url
public URL url() throws IOException
Get its URL.- Returns:
- URL of comment
- Throws:
IOException- If there is any I/O problem
-
createdAt
public Date createdAt() throws IOException
When this comment was created.- Returns:
- Date of creation
- Throws:
IOException- If there is any I/O problem
-
updatedAt
public Date updatedAt() throws IOException
When this comment was updated last time.- Returns:
- Date of update
- Throws:
IOException- If there is any I/O problem
-
number
public int number()
Description copied from interface:CommentNumber.
-
remove
public void remove() throws IOExceptionDescription copied from interface:CommentDelete the comment.- Specified by:
removein interfaceComment- Throws:
IOException- If there is any I/O problem- See Also:
- Delete a Comment
-
react
public void react(Reaction reaction)
Description copied from interface:CommentAdds the reaction to the comment.
-
reactions
public Collection<Reaction> reactions()
Description copied from interface:CommentList the reactions of the comment.
-
json
public javax.json.JsonObject json() throws IOExceptionDescription copied from interface:JsonReadableDescribe it in a JSON object.- Specified by:
jsonin interfaceJsonReadable- Returns:
- JSON object
- Throws:
IOException- If there is any I/O problem
-
patch
public void patch(javax.json.JsonObject json) throws IOExceptionDescription copied from interface:JsonPatchablePatch using this JSON object.- Specified by:
patchin interfaceJsonPatchable- Parameters:
json- JSON object- Throws:
IOException- If there is any I/O problem
-
compareTo
public int compareTo(Comment obj)
- Specified by:
compareToin interfaceComparable<Comment>
-
-