org.specrunner.util.string.core
Class StringNormalizerDefault

java.lang.Object
  extended by org.specrunner.util.string.core.StringNormalizerDefault
All Implemented Interfaces:
IStringNormalizer

public class StringNormalizerDefault
extends Object
implements IStringNormalizer

String normalizer default.

Author:
Thiago Santos

Constructor Summary
StringNormalizerDefault()
           
 
Method Summary
 String camelCase(String text)
          Camel case characters, as Java attributes or methods.
 String camelCase(String text, boolean changeFirst)
          Normalize a string using camel case rules.
 String clean(String str)
          Remove all Latin characters.
 String normalize(String str)
          Normalize a string, removing white spaces.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringNormalizerDefault

public StringNormalizerDefault()
Method Detail

normalize

public String normalize(String str)
Description copied from interface: IStringNormalizer
Normalize a string, removing white spaces.

Specified by:
normalize in interface IStringNormalizer
Parameters:
str - The original string.
Returns:
The normalized version.

camelCase

public String camelCase(String text)
Description copied from interface: IStringNormalizer
Camel case characters, as Java attributes or methods.

Specified by:
camelCase in interface IStringNormalizer
Parameters:
text - The text to change.
Returns:
The text changed.

camelCase

public String camelCase(String text,
                        boolean changeFirst)
Description copied from interface: IStringNormalizer
Normalize a string using camel case rules.

Specified by:
camelCase in interface IStringNormalizer
Parameters:
text - The text to be normalized.
changeFirst - Flag to upper first character also.
Returns:
The normalized string.

clean

public String clean(String str)
Description copied from interface: IStringNormalizer
Remove all Latin characters.

Specified by:
clean in interface IStringNormalizer
Parameters:
str - The string to be normalized.
Returns:
The cleaned string.


Copyright © 2015. All rights reserved.