Class Umlaut


  • public final class Umlaut
    extends java.lang.Object
    DOCUMENT ME!
    Version:
    1.0
    Author:
    Sebastian
    • Constructor Summary

      Constructors 
      Constructor Description
      Umlaut()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String convertUmlauts​(java.lang.String string)
      Expand all umlauts in a string.
      static java.lang.String normalize​(java.lang.String str)
      Expand all umlauts in a string and convert it to uppercase.
      static java.lang.String recode​(java.lang.String string, char[] keys, java.lang.String[] values)
      Search string for a character contained in keys[] and replace it with the corresponding string in values[].
      static java.lang.String replace​(java.lang.String str, java.lang.String from, java.lang.String to)
      Replaces all occurences of from in str with to.
      • Methods inherited from class java.lang.Object

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

      • Umlaut

        public Umlaut()
    • Method Detail

      • convertUmlauts

        public static java.lang.String convertUmlauts​(java.lang.String string)
        Expand all umlauts in a string. Note that uppercase umlauts are converted to mixed case expansions ( -> Ae).
      • recode

        public static java.lang.String recode​(java.lang.String string,
                                              char[] keys,
                                              java.lang.String[] values)
        Search string for a character contained in keys[] and replace it with the corresponding string in values[].
        Parameters:
        string - the string to recode.
        keys - an array of chars to be replaced in string.
        values - an array of the strings that are used as replacements for the corresponding char in keys.
        Returns:
        a string with all occurrences of an element of the keys array replaced by the corresponding element in the values array.
      • replace

        public static java.lang.String replace​(java.lang.String str,
                                               java.lang.String from,
                                               java.lang.String to)
        Replaces all occurences of from in str with to.
      • normalize

        public static java.lang.String normalize​(java.lang.String str)
        Expand all umlauts in a string and convert it to uppercase.
        Parameters:
        str - the string to be normalized.
        Returns:
        the uppercase version of str with all umlauts expanded.