Package ovh.mythmc.social.api.context
Class SocialParserContext.Builder<T extends SocialParserContext.Builder<?,?>,R>
java.lang.Object
ovh.mythmc.social.api.context.SocialParserContext.Builder<T,R>
- Type Parameters:
T- the concrete builder typeR- the build result type
- Direct Known Subclasses:
SocialParserContext.SocialParserContextBuilder
- Enclosing class:
SocialParserContext
public abstract static class SocialParserContext.Builder<T extends SocialParserContext.Builder<?,?>,R>
extends Object
Base builder implementation for
SocialParserContext.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ChatChannelprotected SocialParserGroupprotected List<SocialInjectedValue<?, ?>> protected final Componentprotected ChatChannel.ChannelTypeprotected final SocialUser -
Method Summary
Modifier and TypeMethodDescriptionabstract Rbuild()Builds theSocialParserContext.channel(@NotNull ChatChannel channel) Sets the channel of the context.abstract Tget()Returns the current builder instance.group(@Nullable SocialParserGroup group) Sets the parser group.injectValue(@NotNull SocialInjectedValue<?, ?> injectedValue) Injects a value into the builder.injectValues(@NotNull Iterable<? extends SocialInjectedValue<?, ?>> injectedValues) Injects multiple values into the builder.messageChannelType(ChatChannel.ChannelType channelType) Sets the message channel type.
-
Field Details
-
user
-
message
-
channel
-
messageChannelType
-
group
-
injectedValues
-
-
Method Details
-
build
Builds theSocialParserContext.- Returns:
- the constructed context
-
get
Returns the current builder instance.- Returns:
- this builder
-
channel
Sets the channel of the context.- Parameters:
channel- the chat channel- Returns:
- this builder
-
messageChannelType
Sets the message channel type.- Parameters:
channelType- the channel type- Returns:
- this builder
-
group
Sets the parser group.- Parameters:
group- the parser group- Returns:
- this builder
-
injectValue
Injects a value into the builder.- Parameters:
injectedValue- the value to inject- Returns:
- this builder
-
injectValues
public T injectValues(@NotNull @NotNull Iterable<? extends SocialInjectedValue<?, ?>> injectedValues) Injects multiple values into the builder.- Parameters:
injectedValues- the values to inject- Returns:
- this builder
-