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 Userauthor()Get its author.intcompareTo(Event obj)DatecreatedAt()When this issue was created.booleanhasAuthor()Does it have an author?javax.json.JsonObjectjson()Describe it in a JSON object.com.google.common.base.Optional<Label>label()Label that was added or removed in this event (if any).intnumber()Get its number.Reporepo()Repository we're in.Stringtype()Get its type.URLurl()Get its URL.
-
-
-
Constructor Detail
-
Smart
public Smart(Event evt)
Public ctor.- Parameters:
evt- Event
-
-
Method Detail
-
hasAuthor
public boolean hasAuthor() throws IOExceptionDoes 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:EventGet its number.
-
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
-
compareTo
public int compareTo(Event obj)
- Specified by:
compareToin interfaceComparable<Event>
-
-