Class ParameterMap<S extends Source,K,V,M extends Map<K,V>>

All Implemented Interfaces:
ParameterType<S,M>

public class ParameterMap<S extends Source,K,V,M extends Map<K,V>> extends BaseParameterType<S,M>
  • Constructor Details

  • Method Details

    • resolve

      @Nullable public M resolve(@NotNull @NotNull ExecutionContext<S> context, @NotNull @NotNull CommandInputStream<S> commandInputStream, @NotNull @NotNull String input) throws ImperatException
      Description copied from interface: ParameterType
      Resolves the parameter value from the given input string, using the provided execution context and input stream.
      Parameters:
      context - the execution context.
      commandInputStream - the command input stream.
      input - the raw input string.
      Returns:
      the resolved value, or null if resolution fails.
      Throws:
      ImperatException - if resolution fails due to an error.
    • isGreedy

      public boolean isGreedy(CommandParameter<S> parameter)
      Description copied from interface: ParameterType
      Determines if this parameter type is greedy, meaning it consumes multiple arguments. By default, returns false.
      Parameters:
      parameter - the command parameter.
      Returns:
      true if greedy, false otherwise.