Class ParameterizedArgument

    • Field Detail

      • PARAMETER_SEP

        public static final char PARAMETER_SEP
        Separator for the parameters: ';'.
        See Also:
        Constant Field Values
      • TOKEN_SEP

        public static final char TOKEN_SEP
        Separator for the tokens: '='.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ParameterizedArgument

        public ParameterizedArgument()
        Creates a new instance of ParameterizedArgument with the default separator character of semicolon (";").
    • Method Detail

      • getArgument

        @Nullable
        public String getArgument()
        Returns current argument.
        Returns:
        current argument
      • initializeNbParameters

        protected abstract void initializeNbParameters​(int nbParameters)
        Initialize the number of parameters to read for this argument. Subclasses should override this abstract method.
        Parameters:
        nbParameters - the number of parameters
      • initializeNbTokens

        protected void initializeNbTokens​(int nbTokens)
        Initialize the number of tokens.
        Specified by:
        initializeNbTokens in class CharacterSeparatedList
        Parameters:
        nbTokens - the number of tokens this instance can handle.
      • newParameter

        protected abstract void newParameter​(int id,
                                             int startKey,
                                             int stopKey,
                                             int startValue,
                                             int stopValue)
        Reads a new parameter. A key-value pair is parsed from the current string argument. The key part will be a substring from index startKey to index stopKey. The value part will be the substring from index startValue to index stopValue.
        Parameters:
        id - id for this parameter
        startKey - the start index of searching the key substring in current argument
        stopKey - the stop index of searching the key substring in current argument
        startValue - start index of searching the value substring in current argument
        stopValue - stop index of searching the value substring in current argument
        See Also:
        ContentType.newParameter(int, int, int, int, int), QualityArgument.newParameter(int, int, int, int, int)
      • newToken

        protected void newToken​(int id,
                                int start,
                                int stop)
        Adds a new token to the array of tokens. The search will begin from the index start to the index stop.
        Specified by:
        newToken in class CharacterSeparatedList
        Parameters:
        id - the ID of the token
        start - start index of parameter search in the current string
        stop - end index of parameter search in the current string