
package de.ivu.elect.exchange.csv.converter;

import org.jsefa.common.converter.SimpleTypeConverterConfiguration;

import de.ivu.elect.business.exchange.boundary.ExchangeStringConverter;


import static de.ivu.elect.business.exchange.boundary.ExchangeStringConverter.createDefaultExchangeStringConverter;

public class ElectCsvStringConverter extends AbstractElectCsvStringConverter {

  private final ExchangeStringConverter exchangeStringConverter;

  protected ElectCsvStringConverter(SimpleTypeConverterConfiguration configuration) {
    super(configuration);

    exchangeStringConverter = createDefaultExchangeStringConverter();
  }

  public static ElectCsvStringConverter create(SimpleTypeConverterConfiguration configuration) {
    return new ElectCsvStringConverter(configuration);
  }

  @Override
  public String toString(Object value) {
    return exchangeStringConverter.toString(value);
  }
}
