Package csv.mapper

Interface TypeConverter

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

public interface TypeConverter
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
    fromStream(Object streamObject)
    Converts the string (from stream) into corresponding object.
    Class<?>[]
    Returns the types that this handler is responsible for.
    Converts an object into its stream representation.
  • Method Details

    • getTypes

      Class<?>[] getTypes()
      Returns the types that this handler is responsible for.
      Returns:
      type strings
    • fromStream

      Object fromStream(Object streamObject)
      Converts the string (from stream) into corresponding object.
      Parameters:
      streamObject - object from stream.
      Returns:
      object object to passed to client
    • toStream

      Object toStream(Object o)
      Converts an object into its stream representation.
      Parameters:
      o - Object to convert
      Returns:
      stream representation.