public static final class EventContext.Builder extends Object implements ResettableBuilder<EventContext,EventContext.Builder>
Modifier and Type | Method and Description |
---|---|
<T> EventContext.Builder |
add(EventContextKey<T> key,
T value)
Adds the given context key value pair to the context.
|
EventContext |
build()
Creates a new
EventContext . |
EventContext.Builder |
from(EventContext value)
Resets this builder to the values of the given built object.
|
EventContext.Builder |
reset()
Resets this builder to a "default" state such that there is no
remaining data to set.
|
public <T> EventContext.Builder add(EventContextKey<T> key, T value)
T
- The type of the value stored with the keykey
- The keyvalue
- The valuepublic EventContext.Builder from(EventContext value)
ResettableBuilder
from
in interface ResettableBuilder<EventContext,EventContext.Builder>
value
- The built objectpublic EventContext.Builder reset()
ResettableBuilder
reset
in interface ResettableBuilder<EventContext,EventContext.Builder>
public EventContext build()
EventContext
.