Class NonAlphaNumWordSplitter

  • All Implemented Interfaces:
    IWordSplitter

    public class NonAlphaNumWordSplitter
    extends java.lang.Object
    implements IWordSplitter
    Word splitter on any non alpha numeric characters.
    Author:
    Andi Hotz, (c) Sahits GmbH, 2013 Created on Sep 5, 2013
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String[] split​(java.lang.String word)
      Split the word into its parts based on the defined criteria.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • NonAlphaNumWordSplitter

        public NonAlphaNumWordSplitter()
    • Method Detail

      • split

        public java.lang.String[] split​(java.lang.String word)
        Split the word into its parts based on the defined criteria. The delimiters are retained.
        PRE: the input is a single word: word.split() == {word}
        Split the word at every non alpha-numeric character except the "'". The delimiters are retained as part of the preceding word.
        Note that if multiple delimiters succeed each other the second will be split into a separate word.
        Specified by:
        split in interface IWordSplitter
        Parameters:
        word - single word.
        Returns:
        array of separated words.