Class NonAlphaNumWordSplitter
- java.lang.Object
-
- ch.sahits.game.openpatrician.javafx.control.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
-
-
Constructor Summary
Constructors Constructor Description NonAlphaNumWordSplitter()
-
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.
-
-
-
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 interfaceIWordSplitter
- Parameters:
word
- single word.- Returns:
- array of separated words.
-
-