Class CharacterSeparatedList

    • Constructor Detail

      • CharacterSeparatedList

        public CharacterSeparatedList​(char separator)
        Creates a new instance of CharacterSeparatedList using the character separator as the separator character.
        Parameters:
        separator - the character to treat as characters separator for this list
    • Method Detail

      • endParse

        protected void endParse()
        End instructions of the string parsing.
      • initializeNbTokens

        protected abstract void initializeNbTokens​(int nbTokens)
        Set the number of tokens to read.
        Parameters:
        nbTokens - number of tokens
      • newToken

        protected abstract void newToken​(int id,
                                         int start,
                                         int stop)
        Read a new token between the given start and stop index and set its id.
        Parameters:
        id - for the token
        start - index of the token begin in the string
        stop - index of the token end in the string
      • parse

        public void parse​(String str)
        Parses the given String.
        Parameters:
        str - the String to parse
      • parse

        public void parse​(@Nullable
                          String str,
                          int start,
                          int stop)
        Parses the String str from the start index to the stop index.
        Parameters:
        str - the String to parse
        start - the start index
        stop - the stop index