Class ParameterString<S extends Source>

All Implemented Interfaces:
ParameterType<S,String>

public final class ParameterString<S extends Source> extends BaseParameterType<S,String>
  • Method Details

    • resolve

      @NotNull public @NotNull String resolve(@NotNull @NotNull ExecutionContext<S> context, @NotNull @NotNull CommandInputStream<S> inputStream, @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.
      inputStream - 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.