Interface ArgumentReader

    • Method Detail

      • input

        String input()
        Gets the argument string that is being read by this reader.
        The input String
      • remainingLength

        int remainingLength()
        Get the number of characters that have not yet been read.
        The length of the remaining string
      • totalLength

        int totalLength()
        Gets the length of the input string.
        The length of the input string
      • cursor

        int cursor()
        Gets the location of the cursor.

        If zero, the cursor has not yet read a character. If equal to totalLength(), this cursor is at the end of the string, and canRead() will be false

        The location of the cursor
      • parsed

        String parsed()
        Gets the substring that has already been parsed.
        The substring that has been parsed.
      • remaining

        String remaining()
        Gets the substring that has yet to be read.
        The substring that has yet to be read.
      • canRead

        boolean canRead()
        Gets whether this reader has not finished reading the input string.

        This is equivalent to remainingLength() > 0

        true if there are further characters to read.
      • createException

        ArgumentParseException createException​(Component errorMessage)
        Creates an ArgumentParseException with the provided message, based on the current state of this object.

        Note that the exception will not be thrown. It is up to the caller of this method to throw the exception.

        errorMessage - The error message to display
        The exception