public class Event extends EventObject implements Cloneable
Modifier and Type | Field and Description |
---|---|
static EventType<Event> |
ANY |
source
Constructor and Description |
---|
Event(EventType<? extends Event> type,
Object originator) |
Modifier and Type | Method and Description |
---|---|
protected Object |
clone() |
Event |
copyFor(Object newSource)
Recreates the event with the given instance as the new source.
|
LocalDateTime |
getCreateTime()
Returns the time, when the event was created.
|
Event |
getPreviousEvent()
Returns the previous event or
null , if this is a root event. |
EventType<? extends Event> |
getType()
Returns the event type that is associated with this event instance.
|
boolean |
hasPreviousEvent()
Returns
true , if the event has a previous event. |
getSource, toString
public EventType<? extends Event> getType()
public LocalDateTime getCreateTime()
public Event copyFor(Object newSource)
newSource
- The new sourcethis
is stored as previous eventpublic Event getPreviousEvent()
null
, if this is a root event.null
, if it does not existpublic boolean hasPreviousEvent()
true
, if the event has a previous event.true
, if this has a previous event, otherwise false
Copyright © 2006–2019 The Apache Software Foundation. All rights reserved.