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 type
R - 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 Details

  • Method Details

    • build

      public abstract R build()
      Returns:
      the constructed context
    • get

      public abstract T get()
      Returns the current builder instance.
      Returns:
      this builder
    • channel

      public T channel(@NotNull @NotNull ChatChannel channel)
      Sets the channel of the context.
      Parameters:
      channel - the chat channel
      Returns:
      this builder
    • messageChannelType

      public T messageChannelType(@NotNull ChatChannel.ChannelType channelType)
      Sets the message channel type.
      Parameters:
      channelType - the channel type
      Returns:
      this builder
    • group

      public T group(@Nullable @Nullable SocialParserGroup group)
      Sets the parser group.
      Parameters:
      group - the parser group
      Returns:
      this builder
    • injectValue

      public T injectValue(@NotNull @NotNull SocialInjectedValue<?,?> injectedValue)
      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