Interface ArgumentInput

All Superinterfaces:
Cloneable, Collection<String>, Deque<String>, Iterable<String>, List<String>, Queue<String>

@AvailableSince("1.0.0") public interface ArgumentInput extends Deque<String>, List<String>, Cloneable
Represents a custom data structure made specifically for handling the arguments entered by the Source
  • Method Details

    • parse

      static ArgumentInput parse(String[] rawArguments)
    • parse

      static ArgumentInput parse(String string)
    • parseAutoCompletion

      static ArgumentInput parseAutoCompletion(String[] argumentsOnly, boolean extraLastSpace)
    • parseAutoCompletion

      static ArgumentInput parseAutoCompletion(String string, boolean extraLastSpace)
    • of

      static ArgumentInput of(String originalLine)
      Returns:
      a new, empty ArgumentInput.
    • empty

      static ArgumentInput empty()
      Returns:
      a new, empty ArgumentInput.
    • getOriginalRaw

      String getOriginalRaw()
    • getOr

      @Nullable default @Nullable String getOr(int index, @Nullable @Nullable String def)
      Fetches the element at the specified index
      Parameters:
      index - the index
      def - the default element
      Returns:
      the element at the specified index.
    • join

      @NotNull @NotNull String join(String delimiter)
      Joins all present arguments in this stack
      Parameters:
      delimiter - Delimiter between these arguments.
      Returns:
      The combined string
    • join

      @NotNull @NotNull String join(@NotNull @NotNull String delimiter, int startIndex)
      Joins all present arguments in this stack, starting from the specified index
      Parameters:
      delimiter - Delimiter between these arguments
      startIndex - The start index to combine from
      Returns:
      The combined string
    • copy

      @NotNull @NotNull ArgumentInput copy()
      Returns an independent copy of this argument stack.
      Returns:
      A copy of this argument stack