Package com.topologi.diffx.config

Examples of com.topologi.diffx.config.TextGranularity


   *
   * @return the Diff-X config for the specified arguments as String.
   */
  private static DiffXConfig toConfig(String whitespace, String granularity) {
    WhiteSpaceProcessing ws = WhiteSpaceProcessing.valueOf(whitespace);
    TextGranularity tg = TextGranularity.valueOf(granularity);
    return new DiffXConfig(ws, tg);
  }
View Full Code Here


   *
   * @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:
View Full Code Here

TOP

Related Classes of com.topologi.diffx.config.TextGranularity

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.