Package com.jcabi.github
Class GistComment.Smart
java.lang.Object
com.jcabi.github.GistComment.Smart
- All Implemented Interfaces:
GistComment,JsonPatchable,JsonReadable,Comparable<GistComment>
- Enclosing interface:
- GistComment
@Immutable
@Loggable(1)
public static final class GistComment.Smart
extends Object
implements GistComment
Smart comment with additional features.
- Since:
- 0.8
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.jcabi.github.GistComment
GistComment.Smart -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionauthor()Get its author.body()Get its body.voidChange comment body.intcompareTo(GistComment cmt) When this comment was created.gist()The gist it's in.jakarta.json.JsonObjectjson()Describe it in a JSON object.intnumber()Number.voidpatch(jakarta.json.JsonObject json) Patch using this JSON object.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
-
gist
Description copied from interface:GistCommentThe gist it's in.- Specified by:
gistin interfaceGistComment- Returns:
- Owner of the comment
-
number
public int number()Description copied from interface:GistCommentNumber.- Specified by:
numberin interfaceGistComment- Returns:
- Comment id
-
remove
Description copied from interface:GistCommentDelete the comment.- Specified by:
removein interfaceGistComment- Throws:
IOException- If there is any I/O problem
-
compareTo
- Specified by:
compareToin interfaceComparable<GistComment>
-
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
-
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
-