public abstract class Event extends Object implements GenericEvent
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Event other)
Compare events by
getTimestamp() and then getId() to
order by when they are received. |
boolean |
equals(Object o) |
<T extends PircBotX> |
getBot()
The
PircBotX instance that this event originally came from |
long |
getId()
Returns the id of this event generated by incrementing an instance counter
|
long |
getTimestamp()
Returns the millisecond when the event was created.
|
int |
hashCode() |
abstract void |
respond(String response)
A simple abstract method that all events must implement to respond to an
event happening.
|
public Event(PircBotX bot)
public abstract void respond(String response)
respond
in interface GenericEvent
response
- The response to sendpublic int compareTo(Event other)
getTimestamp()
and then getId()
to
order by when they are received. This is useful for sorting lists of
Channel objects.compareTo
in interface Comparable<Event>
other
- Other Event to compare topublic <T extends PircBotX> T getBot()
GenericEvent
PircBotX
instance that this event originally came fromgetBot
in interface GenericEvent
PircBotX
instance@Generated(value="lombok") public long getTimestamp()
getTimestamp
in interface GenericEvent
System.currentTimeMillis()
@Generated(value="lombok") public long getId()
Copyright © 2010–2020 Leon Blakey. All rights reserved.