public class DefaultStringConverter<T> extends java.lang.Object implements IStringConverter<T>
asString()
if
the object is an IStringRepresentation
, otherwise toString()
.Constructor and Description |
---|
DefaultStringConverter() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
convert(T object)
Returns the string representation of the given object.
|
static <V> DefaultStringConverter<V> |
create()
Returns a new instance of this class.
|
public static <V> DefaultStringConverter<V> create()
public java.lang.String convert(T object)
asString()
if the object is an IStringRepresentation
,
otherwise toString()
.
A null input will return null, too.convert
in interface IObjectConverter<T,java.lang.String>
convert
in interface IStringConverter<T>
object
- The object to be converted (may be null).