All Downloads are FREE. Search and download functionalities are using the official Maven repository.

kz.greetgo.strconverter.simple.StrConverterSimple Maven / Gradle / Ivy

package kz.greetgo.strconverter.simple;

import kz.greetgo.strconverter.StrConverter;
import kz.greetgo.strconverter.simple.core.ConvertRegistry;
import kz.greetgo.strconverter.simple.core.Reader;
import kz.greetgo.strconverter.simple.core.Writer;

public class StrConverterSimple implements StrConverter {

  private final ConvertRegistry convertRegistry = new ConvertRegistry();

  public ConvertRegistry convertRegistry() {
    return convertRegistry;
  }

  @Override
  public String toStr(Object object) {
    return new Writer(convertRegistry).write(object).result();
  }

  @Override
  public  T fromStr(String str) {
    return new Reader(convertRegistry, str).read();
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy