Package com.jcabi.github
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.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.jcabi.github.Event
Event.Smart
-
-
Field Summary
-
Fields inherited from interface com.jcabi.github.Event
ASSIGNED, CLOSED, DEMILESTONED, HEAD_REF_DELETED, HEAD_REF_RESTORED, LABELED, LOCKED, MENTIONED, MERGED, MILESTONED, REFERENCED, RENAMED, REOPENED, SUBSCRIBED, UNASSIGNED, UNLABELED, UNLOCKED
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description User
author()
Get its author.int
compareTo(Event obj)
Date
createdAt()
When this issue was created.boolean
hasAuthor()
Does it have an author?javax.json.JsonObject
json()
Describe it in a JSON object.com.google.common.base.Optional<Label>
label()
Label that was added or removed in this event (if any).int
number()
Get its number.Repo
repo()
Repository we're in.String
type()
Get its type.URL
url()
Get its URL.
-
-
-
Constructor Detail
-
Smart
public Smart(Event evt)
Public ctor.- Parameters:
evt
- Event
-
-
Method Detail
-
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
-
number
public int number()
Description copied from interface:Event
Get its number.
-
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
-
compareTo
public int compareTo(Event obj)
- Specified by:
compareTo
in interfaceComparable<Event>
-
-