Class TextDispatcher<MSG,​RECEIVER,​SELF extends TextDispatcher<MSG,​RECEIVER,​SELF>>

  • All Implemented Interfaces:
    Insertable<RECEIVER,​SELF>, Replaceable<RECEIVER,​SELF>
    Direct Known Subclasses:
    PreparedText

    public abstract class TextDispatcher<MSG,​RECEIVER,​SELF extends TextDispatcher<MSG,​RECEIVER,​SELF>>
    extends TextCompiler<MSG,​RECEIVER,​SELF>
    • Field Detail

      • dispatcher

        @NotNull
        protected @NotNull java.util.function.BiConsumer<RECEIVER,​java.util.List<MSG>> dispatcher
    • Constructor Detail

      • TextDispatcher

        public TextDispatcher()
    • Method Detail

      • dispatcher

        public SELF dispatcher​(@NotNull
                               @NotNull java.util.function.BiConsumer<RECEIVER,​java.util.List<MSG>> dispatcher)
        Set the dispatcher to send the message to the receiver
        Parameters:
        dispatcher - the dispatcher
        Returns:
        TextDispatcher
      • to

        @SafeVarargs
        public final void to​(@NotNull
                             @NotNull RECEIVER... receivers)
        Dispatch the message to the receiver
        Parameters:
        receivers - the receivers
      • to

        public void to​(@NotNull
                       @NotNull java.lang.Iterable<? extends RECEIVER> receivers)
        Dispatch the message to the receiver
        Parameters:
        receivers - the receivers
      • to

        public void to​(@NotNull
                       @NotNull java.util.function.Supplier<java.lang.Iterable<? extends RECEIVER>> receivers)
        Dispatch the message to the receiver
        Parameters:
        receivers - the receivers