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
Smart comment with additional features.
- Since:
- 0.1
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.jcabi.github.Comment
Comment.Smart -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionauthor()Get its author.body()Get its body.voidChange comment body.intWhen this comment was created.issue()The issue it's in.jakarta.json.JsonObjectjson()Describe it in a JSON object.longnumber()Number.voidpatch(jakarta.json.JsonObject json) Patch using this JSON object.voidAdds the reaction to the comment.List the reactions of the comment.voidremove()Delete the comment.When this comment was updated last time.url()Get its URL.
-
Constructor Details
-
Smart
Public ctor.- Parameters:
cmt- Comment
-
-
Method Details
-
author
Get its author.- Returns:
- Author of comment
- Throws:
IOException- If there is any I/O problem
-
body
Get its body.- Returns:
- Body of comment
- Throws:
IOException- If there is any I/O problem
-
body
Change comment body.- Parameters:
text- Body of comment- Throws:
IOException- If there is any I/O problem
-
url
Get its URL.- Returns:
- URL of comment
- Throws:
IOException- If there is any I/O problem
-
createdAt
When this comment was created.- Returns:
- Date of creation
- Throws:
IOException- If there is any I/O problem
-
updatedAt
When this comment was updated last time.- Returns:
- Date of update
- Throws:
IOException- If there is any I/O problem
-
issue
Description copied from interface:CommentThe issue it's in. -
number
public long number()Description copied from interface:CommentNumber. -
remove
Description copied from interface:CommentDelete the comment.- Specified by:
removein interfaceComment- Throws:
IOException- If there is any I/O problem- See Also:
-
react
Description copied from interface:CommentAdds the reaction to the comment. -
reactions
Description copied from interface:CommentList the reactions of the comment. -
json
Description 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
Description 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
- Specified by:
compareToin interfaceComparable<Comment>
-