Package com.jcabi.github.safe
Class SfComment
- java.lang.Object
-
- com.jcabi.github.safe.SfComment
-
- All Implemented Interfaces:
Comment,JsonPatchable,JsonReadable,Comparable<Comment>
@Immutable @Loggable(1) public final class SfComment extends Object implements Comment
Safe comment.- Since:
- 0.34
- Version:
- $Id: d935ece9b791b35502233c7abbd41f81aad99873 $
- Author:
- Yegor Bugayenko (yegor256@gmail.com), Paulo Lobo (pauloeduardolobo@gmail.com)
-
-
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 intcompareTo(Comment cmt)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.Iterable<Reaction>reactions()List the reactions of the comment.voidremove()Delete the comment.StringtoString()
-
-
-
Constructor Detail
-
SfComment
public SfComment(Comment cmt)
Public ctor.- Parameters:
cmt- The original comment
-
-
Method Detail
-
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) throws IOException
Description copied from interface:CommentAdds the reaction to the comment.- Specified by:
reactin interfaceComment- Parameters:
reaction- Reaction to be added.- Throws:
IOException- In case something goes wrong.
-
reactions
public Iterable<Reaction> reactions()
Description copied from interface:CommentList the reactions of the comment.
-
compareTo
public int compareTo(Comment cmt)
- Specified by:
compareToin interfaceComparable<Comment>
-
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
-
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
-
-