Class ParameterCollection<S extends Source,E,C extends Collection<E>>

java.lang.Object
studio.mevera.imperat.util.TypeCapturer
studio.mevera.imperat.command.parameters.type.BaseParameterType<S,C>
studio.mevera.imperat.command.parameters.type.ParameterCollection<S,E,C>
All Implemented Interfaces:
ParameterType<S,C>

public class ParameterCollection<S extends Source,E,C extends Collection<E>> extends BaseParameterType<S,C>
  • Constructor Details

  • Method Details

    • resolve

      @Nullable public C 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.