## org.apache.mahout.common
Class StringUtils

    java.lang.Object
      org.apache.mahout.common.StringUtils

    public final class StringUtils

extends Object

Offers two methods to convert an object to a string representation and restore the object given its string representation. Should use Hadoop Stringifier whenever available.

Method Summary
`static String` `escapeXML(CharSequence input)`

`static

`<T> T`

`

`fromString(String str)`
Restores the object from its string representation.

`static String` `toString(Object obj)` Converts the object to a one-line string representation

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### toString

    public static String toString(Object obj)

  Converts the object to a one-line string representation

  Parameters:
    `obj` - the object to convert
  Returns:
    the string representation of the object

### fromString

    public static <T> T fromString(String str)

  Restores the object from its string representation.

  Parameters:
    `str` - the string representation of the object
  Returns:
    restored object

### escapeXML

    public static String escapeXML(CharSequence input)

Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.