Package repast.simphony.parameter
Class StringConverterFactory
java.lang.Object
repast.simphony.parameter.StringConverterFactory
- Author:
- Nick Collier Date: Dec 22, 2008 3:50:56 PM
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
static class
static class
static class
static class
static class
static class
-
Method Summary
Modifier and TypeMethodDescription<T> void
addConverter
(Class<T> clazz, StringConverter<T> converter) Adds a converter to the factory for the specified class.<T> StringConverter<T>
getConverter
(Class<T> clazz) Get StringConverter appropriate for the specified class.static StringConverterFactory
instance()
Gets the singleton instance.
-
Method Details
-
instance
Gets the singleton instance.- Returns:
- the singleton instance.
-
getConverter
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
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 withconverter
- the converter
-