public interface Event extends Cloneable, Serializable, HasPriority<Event>
| Modifier and Type | Method and Description |
|---|---|
Event |
clone()
Clones this event.
|
boolean |
equalsByAttributes(Event event)
Compares events by attributes.
|
boolean |
equalsById(Event event)
Compares events by ID.
|
Object |
get(String name)
Returns the attribute value or
null if it does't exist. |
<T> T |
get(String name,
Class<T> cls)
Returns the attribute value or
null if it does't exist. |
Map<String,Object> |
getAll()
Returns attribute map.
|
String |
getId()
Returns event ID.
|
String |
getName()
Returns event name.
|
Instant |
getTime()
Returns event time.
|
boolean |
has(String name)
Checks whether this event has an attribute with the specified name.
|
Event |
set(String name,
Object value)
Sets attribute value.
|
void |
setId(String id)
Sets event ID.
|
void |
setTime(Instant time)
Sets event time.
|
getPriorityString getName()
Instant getTime()
void setTime(Instant time)
time - event time.String getId()
void setId(String id)
id - event ID.Object get(String name)
null if it does't exist.name - attribute name.<T> T get(String name, Class<T> cls)
null if it does't exist.T - attribute.name - attribute name.cls - attribute class.Event set(String name, Object value)
name - attribute name.value - attribute value.boolean has(String name)
name - attribute name.true if there is such attribute.boolean equalsById(Event event)
event - compared event.true if both events are equal by ID.boolean equalsByAttributes(Event event)
event - compared event.true if both events are equal by attributes.Event clone()
Copyright © 2016–2017 Softelnet. All rights reserved.