public abstract class TagContextBuilder extends Object
TagContext class.| Constructor and Description |
|---|
TagContextBuilder() |
| Modifier and Type | Method and Description |
|---|---|
abstract TagContext |
build()
Creates a
TagContext from this builder. |
abstract Scope |
buildScoped()
Enters the scope of code where the
TagContext created from this builder is in the
current context and returns an object that represents that scope. |
abstract TagContextBuilder |
put(TagKey key,
TagValue value)
Adds the key/value pair regardless of whether the key is present.
|
abstract TagContextBuilder |
remove(TagKey key)
Removes the key if it exists.
|
public abstract TagContextBuilder put(TagKey key, TagValue value)
key - the TagKey which will be set.value - the TagValue to set for the given key.public abstract TagContextBuilder remove(TagKey key)
key - the TagKey which will be removed.public abstract TagContext build()
TagContext from this builder.TagContext with the same tags as this builder.public abstract Scope buildScoped()
TagContext created from this builder is in the
current context and returns an object that represents that scope. The scope is exited when the
returned object is closed.TagContext created from this builder
is set to the current context.