Class IdentifierUtility

java.lang.Object
org.refcodes.runtime.IdentifierUtility

public class IdentifierUtility extends Object
Utility class addressing various identifier related issues.
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    toNormalized(String aText, char aSeparator)
    Normalizes the provided text by removing all non-alphanumeric and non-numeric prefixed and suffixed characters, adding a separator whenever lower case characters are followed by upper case characters and by converting multiple succeeding separators to a single separator and by converting all upper case characters to lower case.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • toNormalized

      public static String toNormalized(String aText, char aSeparator)
      Normalizes the provided text by removing all non-alphanumeric and non-numeric prefixed and suffixed characters, adding a separator whenever lower case characters are followed by upper case characters and by converting multiple succeeding separators to a single separator and by converting all upper case characters to lower case.
      Parameters:
      aText - The text to be normalized.
      aSeparator - The separator character to be used for normalization.
      Returns:
      The normalized String or null in case the resulting String will be empty or null was provided as text.