com.linkedin.restli.internal.common
Class ValueConverter

java.lang.Object
  extended by com.linkedin.restli.internal.common.ValueConverter

public class ValueConverter
extends java.lang.Object


Constructor Summary
ValueConverter()
           
 
Method Summary
static java.lang.Object coerceString(java.lang.String value, java.lang.Class<?> clazz)
          Attempt to coerce the given string into an object of the given class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValueConverter

public ValueConverter()
Method Detail

coerceString

public static java.lang.Object coerceString(java.lang.String value,
                                            java.lang.Class<?> clazz)
Attempt to coerce the given string into an object of the given class.

Parameters:
value - the String value to coercer. could be null
clazz - the class to coercer the string into valid values are string, short, int, long, float, double (and equivalent boxed types), ByteString or enum.
Returns:
an Object of the type coerced to. if value is null, return null