public abstract class BaseEvent extends Object implements Comparable<BaseEvent>, Event
compareTo(BaseEvent)
orders events according to natural ordering of their IDs.Modifier | Constructor and Description |
---|---|
protected |
BaseEvent(long id,
long timestamp) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(BaseEvent that) |
boolean |
equals(Object o) |
Object |
getId() |
long |
getTimestamp()
Relative time of event.
|
int |
hashCode() |
String |
toString() |
protected BaseEvent(long id, long timestamp)
id
- Unique event IDtimestamp
- Timestamppublic long getTimestamp()
Event
getTimestamp
in interface Event
public int compareTo(BaseEvent that)
compareTo
in interface Comparable<BaseEvent>
Copyright © 2016–2021. All rights reserved.