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
  • Constructor Details

    • SfComment

      public SfComment(Comment cmt)
      Public ctor.
      Parameters:
      cmt - The original comment
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • issue

      public Issue issue()
      Description copied from interface: Comment
      The issue it's in.
      Specified by:
      issue in interface Comment
      Returns:
      Owner of the comment
    • number

      public long number()
      Description copied from interface: Comment
      Number.
      Specified by:
      number in interface Comment
      Returns:
      Comment number
    • remove

      public void remove() throws IOException
      Description copied from interface: Comment
      Delete the comment.
      Specified by:
      remove in interface Comment
      Throws:
      IOException - If there is any I/O problem
      See Also:
    • react

      public void react(Reaction reaction) throws IOException
      Description copied from interface: Comment
      Adds the reaction to the comment.
      Specified by:
      react in interface Comment
      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.
      Specified by:
      reactions in interface Comment
      Returns:
      Comment reactions.
    • compareTo

      public int compareTo(Comment cmt)
      Specified by:
      compareTo in interface Comparable<Comment>
    • patch

      public void patch(jakarta.json.JsonObject json) throws IOException
      Description copied from interface: JsonPatchable
      Patch using this JSON object.
      Specified by:
      patch in interface JsonPatchable
      Parameters:
      json - JSON object
      Throws:
      IOException - If there is any I/O problem
    • json

      public jakarta.json.JsonObject json() throws IOException
      Description copied from interface: JsonReadable
      Describe it in a JSON object.
      Specified by:
      json in interface JsonReadable
      Returns:
      JSON object
      Throws:
      IOException - If there is any I/O problem