com.topologi.diffx.load.text
Class TokenizerByChar

java.lang.Object
  extended by com.topologi.diffx.load.text.TokenizerByChar
All Implemented Interfaces:
TextTokenizer

public final class TokenizerByChar
extends Object
implements TextTokenizer

The tokeniser for characters events.

This class is not synchronized.

Version:
10 May 2010
Author:
Christophe Lauret

Constructor Summary
TokenizerByChar()
          Creates a new tokenizer.
 
Method Summary
 TextGranularity granurality()
          Always TextGranularity.CHARACTER.
 List<TextEvent> tokenize(CharSequence seq)
          Returns the list of TextEvent corresponding to the specified character sequence.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TokenizerByChar

public TokenizerByChar()
Creates a new tokenizer.

Method Detail

tokenize

public List<TextEvent> tokenize(CharSequence seq)
Returns the list of TextEvent corresponding to the specified character sequence.

Specified by:
tokenize in interface TextTokenizer
Parameters:
seq - the character sequence to tokenize.
Returns:
the corresponding list.

granurality

public TextGranularity granurality()
Always TextGranularity.CHARACTER. Returns the text granularity of this tokenizer.

Specified by:
granurality in interface TextTokenizer
Returns:
the text granularity of this tokenizer.