Package org.apache.commons.lang3.text
Class StrBuilder.StrBuilderTokenizer
- java.lang.Object
-
- org.apache.commons.lang3.text.StrTokenizer
-
- org.apache.commons.lang3.text.StrBuilder.StrBuilderTokenizer
-
- All Implemented Interfaces:
Cloneable,Iterator<String>,ListIterator<String>
- Enclosing class:
- StrBuilder
class StrBuilder.StrBuilderTokenizer extends StrTokenizer
Inner class to allow StrBuilder to operate as a tokenizer.
-
-
Constructor Summary
Constructors Constructor Description StrBuilderTokenizer()Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetContent()Gets the String content that the tokenizer is parsing.protected List<String>tokenize(char[] chars, int offset, int count)Internal method to performs the tokenization.-
Methods inherited from class org.apache.commons.lang3.text.StrTokenizer
add, clone, cloneReset, getCSVInstance, getCSVInstance, getCSVInstance, getDelimiterMatcher, getIgnoredMatcher, getQuoteMatcher, getTokenArray, getTokenList, getTrimmerMatcher, getTSVInstance, getTSVInstance, getTSVInstance, hasNext, hasPrevious, isEmptyTokenAsNull, isIgnoreEmptyTokens, next, nextIndex, nextToken, previous, previousIndex, previousToken, remove, reset, reset, reset, set, setDelimiterChar, setDelimiterMatcher, setDelimiterString, setEmptyTokenAsNull, setIgnoredChar, setIgnoredMatcher, setIgnoreEmptyTokens, setQuoteChar, setQuoteMatcher, setTrimmerMatcher, size, toString
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Method Detail
-
tokenize
protected List<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.
StrTokenizerwill 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:
tokenizein classStrTokenizer- Parameters:
chars- the character array being tokenized, may be nulloffset- the start position within the character array, must be validcount- the number of characters to tokenize, must be valid- Returns:
- the modifiable list of String tokens, unmodifiable if null array or zero count
-
getContent
public String getContent()
Gets the String content that the tokenizer is parsing.- Overrides:
getContentin classStrTokenizer- Returns:
- the string content being parsed
-
-