Package csv

Interface TypeConversionHandler

All Known Implementing Classes:
BooleanConversionHandler, ByteConversionHandler, CharConversionHandler, DateConversionHandler, DoubleConversionHandler, FloatConversionHandler, IntegerConversionHandler, LongConversionHandler, ShortConversionHandler

public interface TypeConversionHandler
A type conversion handler can take any string and convert it to an appropriate object and vice versa.
Author:
ralph
  • Method Summary

    Modifier and Type Method Description
    java.lang.String[] getTypes()
    Returns the types that this handler is responsible for.
    java.lang.Object toObject​(java.lang.String s)
    Converts the string (from stream) into corresponding object.
    java.lang.String toString​(java.lang.Object o)
    Converts an object into its string representation.
  • Method Details

    • getTypes

      java.lang.String[] getTypes()
      Returns the types that this handler is responsible for.
      Returns:
      type strings
    • toObject

      java.lang.Object toObject​(java.lang.String s)
      Converts the string (from stream) into corresponding object.
      Parameters:
      s - string representation.
      Returns:
      object
    • toString

      java.lang.String toString​(java.lang.Object o)
      Converts an object into its string representation.
      Parameters:
      o - Object to convert
      Returns:
      string representation.