Interface CommandContext.Builder

    • Method Detail

      • addFlagInvocation

        void addFlagInvocation​(Flag flag)
        Adds a flag invocation to the context.
        Parameters:
        flag - The flag to add the invocation for.
      • putEntry

        default <T> void putEntry​(Parameter.Value<? super T> parameter,
                                  T value)
        Adds a parsed object into the context, for use by commands.
        Type Parameters:
        T - The type of parameter key
        Parameters:
        parameter - The key to store the entry under.
        value - The collection of objects to store.
      • putEntries

        default <T> void putEntries​(Parameter.Value<? super T> parameter,
                                    Collection<T> value)
        Adds a collection of parsed objects into the context, for use by commands.
        Type Parameters:
        T - The type of parameter key
        Parameters:
        parameter - The key to store the entry under.
        value - The collection of objects to store.
      • putEntries

        default <T> void putEntries​(Parameter.Key<? super T> parameter,
                                    Collection<T> value)
        Adds a collection of parsed objects into the context, for use by commands.
        Type Parameters:
        T - The type of parameter key
        Parameters:
        parameter - The key to store the entry under.
        value - The collection of objects to store.
      • putEntry

        <T> void putEntry​(Parameter.Key<T> key,
                          T object)
        Adds a parsed object into the context, for use by commands.
        Type Parameters:
        T - The type of parameter key
        Parameters:
        key - The key to store the entry under.
        object - The object to store.
      • startTransaction

        CommandContext.Builder.Transaction startTransaction()
        Starts a CommandContext.Builder.Transaction which allows for this builder to be returned to a previous state if necessary.

        Multiple transactions can be started on the same builder, however, they must be either committed or rolledback in reverse order (that is, the last transaction must be committed first)

        Transactions must not be held on to for longer than necessary.

        Returns:
        The state.