*
* @throws NullPointerException If the configuration is <code>null</code>.
*/
public static TextTokenizer get(DiffXConfig config) {
if (config == null) throw new NullPointerException("The config should be specified");
TextGranularity granularity = config.getGranularity();
switch (granularity) {
case CHARACTER: return new TokenizerByChar();
case WORD: return new TokenizerByWord(config.getWhiteSpaceProcessing());
case TEXT: return new TokenizerByText(config.getWhiteSpaceProcessing());
default: