Class TextStringBuilder.TextStringBuilderTokenizer

  • All Implemented Interfaces:
    java.lang.Cloneable, java.util.Iterator<java.lang.String>, java.util.ListIterator<java.lang.String>
    Enclosing class:
    TextStringBuilder

    class TextStringBuilder.TextStringBuilderTokenizer
    extends StringTokenizer
    Inner class to allow StrBuilder to operate as a tokenizer.
    • Constructor Detail

      • TextStringBuilderTokenizer

        TextStringBuilderTokenizer()
        Default constructor.
    • Method Detail

      • getContent

        public java.lang.String getContent()
        Gets the String content that the tokenizer is parsing.
        Overrides:
        getContent in class StringTokenizer
        Returns:
        The string content being parsed
      • tokenize

        protected java.util.List<java.lang.String> tokenize​(char[] chars,
                                                            int offset,
                                                            int count)
        Internal method to performs the tokenization.

        Most users of this class do not need to call this method. This method will be called automatically by other (public) methods when required.

        This method exists to allow subclasses to add code before or after the tokenization. For example, a subclass could alter the character array, offset or count to be parsed, or call the tokenizer multiple times on multiple strings. It is also be possible to filter the results.

        StrTokenizer will always pass a zero offset and a count equal to the length of the array to this method, however a subclass may pass other values, or even an entirely different array.

        Overrides:
        tokenize in class StringTokenizer
        Parameters:
        chars - the character array being tokenized, may be null
        offset - the start position within the character array, must be valid
        count - the number of characters to tokenize, must be valid
        Returns:
        The modifiable list of String tokens, unmodifiable if null array or zero count