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 int
compareTo(Comment cmt)
Issue
issue()
The issue it's in.javax.json.JsonObject
json()
Describe it in a JSON object.int
number()
Number.void
patch(javax.json.JsonObject json)
Patch using this JSON object.void
react(Reaction reaction)
Adds the reaction to the comment.Iterable<Reaction>
reactions()
List the reactions of the comment.void
remove()
Delete the comment.String
toString()
-
-
-
Constructor Detail
-
SfComment
public SfComment(Comment cmt)
Public ctor.- Parameters:
cmt
- The original comment
-
-
Method Detail
-
number
public int number()
Description copied from interface:Comment
Number.
-
remove
public void remove() throws IOException
Description copied from interface:Comment
Delete the comment.- Specified by:
remove
in 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:Comment
Adds the reaction to the comment.- Specified by:
react
in interfaceComment
- Parameters:
reaction
- Reaction to be added.- Throws:
IOException
- In case something goes wrong.
-
reactions
public Iterable<Reaction> reactions()
Description copied from interface:Comment
List the reactions of the comment.
-
compareTo
public int compareTo(Comment cmt)
- Specified by:
compareTo
in interfaceComparable<Comment>
-
patch
public void patch(javax.json.JsonObject json) throws IOException
Description copied from interface:JsonPatchable
Patch using this JSON object.- Specified by:
patch
in interfaceJsonPatchable
- Parameters:
json
- JSON object- Throws:
IOException
- If there is any I/O problem
-
json
public javax.json.JsonObject json() throws IOException
Description copied from interface:JsonReadable
Describe it in a JSON object.- Specified by:
json
in interfaceJsonReadable
- Returns:
- JSON object
- Throws:
IOException
- If there is any I/O problem
-
-