Class StringConverterFactory

java.lang.Object
repast.simphony.parameter.StringConverterFactory

public class StringConverterFactory extends Object
Author:
Nick Collier Date: Dec 22, 2008 3:50:56 PM
  • Method Details

    • instance

      public static StringConverterFactory instance()
      Gets the singleton instance.
      Returns:
      the singleton instance.
    • getConverter

      public <T> StringConverter<T> getConverter(Class<T> clazz)
      Get StringConverter appropriate for the specified class.
      Type Parameters:
      T - the type of the class
      Parameters:
      clazz - the class to get the StringConverter for
      Returns:
      the StringConverter. This can return NULL, if no StringConverter has been registered.
    • addConverter

      public <T> void addConverter(Class<T> clazz, StringConverter<T> converter)
      Adds a converter to the factory for the specified class.
      Type Parameters:
      T - the type the converter works on
      Parameters:
      clazz - the class the converter works with
      converter - the converter