Class Event.Smart

java.lang.Object
com.jcabi.github.Event.Smart
All Implemented Interfaces:
Event, JsonReadable, Comparable<Event>
Enclosing interface:
Event

@Immutable @Loggable(1) public static final class Event.Smart extends Object implements Event
Smart event with extra features.
Since:
0.6.1
  • Constructor Details

    • Smart

      public Smart(Event evt)
      Public ctor.
      Parameters:
      evt - Event
  • Method Details

    • hasAuthor

      public boolean hasAuthor() throws IOException
      Does it have an author?
      Returns:
      TRUE if the author exists
      Throws:
      IOException - If there is any I/O problem
    • author

      public User author() throws IOException
      Get its author.
      Returns:
      Author of comment
      Throws:
      IOException - If there is any I/O problem
    • type

      public String type() throws IOException
      Get its type.
      Returns:
      State of issue
      Throws:
      IOException - If there is any I/O problem
    • url

      public URL url() throws IOException
      Get its URL.
      Returns:
      URL of issue
      Throws:
      IOException - If there is any I/O problem
    • createdAt

      public Date createdAt() throws IOException
      When this issue was created.
      Returns:
      Date of creation
      Throws:
      IOException - If there is any I/O problem
    • label

      public com.google.common.base.Optional<Label> label() throws IOException
      Label that was added or removed in this event (if any).
      Returns:
      Label that was added or removed
      Throws:
      IOException - If there is any I/O problem
      Since:
      0.24
    • repo

      public Repo repo()
      Description copied from interface: Event
      Repository we're in.
      Specified by:
      repo in interface Event
      Returns:
      Repo
    • number

      public int number()
      Description copied from interface: Event
      Get its number.
      Specified by:
      number in interface Event
      Returns:
      Issue number
    • 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
    • compareTo

      public int compareTo(Event obj)
      Specified by:
      compareTo in interface Comparable<Event>