com.univocity.parsers.conversions
Class ToStringConversion

java.lang.Object
  extended by com.univocity.parsers.conversions.NullConversion<Object,Object>
      extended by com.univocity.parsers.conversions.ToStringConversion
All Implemented Interfaces:
Conversion<Object,Object>

public class ToStringConversion
extends NullConversion<Object,Object>

Converts any non-null object to its String representation.


Constructor Summary
ToStringConversion()
           
ToStringConversion(Object valueOnNullInput, Object valueOnNullOutput)
           
 
Method Summary
protected  Object fromInput(Object input)
          Creates an instance of O from a I object
protected  Object undo(Object input)
          Converts a value of type O back to I.
 
Methods inherited from class com.univocity.parsers.conversions.NullConversion
execute, getValueOnNullInput, getValueOnNullOutput, revert, setValueOnNullInput, setValueOnNullOutput
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ToStringConversion

public ToStringConversion()

ToStringConversion

public ToStringConversion(Object valueOnNullInput,
                          Object valueOnNullOutput)
Method Detail

fromInput

protected Object fromInput(Object input)
Description copied from class: NullConversion
Creates an instance of O from a I object

Specified by:
fromInput in class NullConversion<Object,Object>
Parameters:
input - The object of type I to be converted to O
Returns:
an instance of O, converted from the I input.

undo

protected Object undo(Object input)
Description copied from class: NullConversion
Converts a value of type O back to I.

Specified by:
undo in class NullConversion<Object,Object>
Parameters:
input - the input object to be converted to I
Returns:
the conversion result


Copyright © 2017 uniVocity Software Pty Ltd. All rights reserved.