public class ConverterLibrary extends Object
The ConverterLibrary
contains all available Coverters, converting Strings.
General purpose data type converters are able to convert Strings into objects that are usually as parameters when setters are called on javax.swing objects.
Available Converter include converters able to produce
Example String inputs could look like this:
Converter
Modifier and Type | Method and Description |
---|---|
Converter |
getConverter(Class template)
Returns a
Converter instance, able to produce objects of the given class |
Map |
getConverters() |
static ConverterLibrary |
getInstance() |
boolean |
hasConverter(Class template)
Indicates if a the ConverterLibary has a Converter producing instances of the given Class.
|
void |
register(Class template,
Converter converter)
Registers a Converter with the ConverterLibrary
|
void |
register(Converter converter)
Registers a Converter with the ConverterLibrary
|
public static ConverterLibrary getInstance()
ConverterLibrary
the single instacne of the ConverterLibrary.public Map getConverters()
Map
- all registered converters.
Use a class to get to the converters
public void register(Converter converter)
converter
- Converter
Instance of Converter able to convert Strings into objects of the given typepublic void register(Class template, Converter converter)
template
- Class
type of the objects the Converter createsconverter
- Converter
Instance of Converter able to convert Strings into objects of the given typepublic boolean hasConverter(Class template)
template
- Class
boolean
true, if the ConverterLibrary has a Converter to produce an instances of the gioven class.Copyright © 2002 - 2013 - Wolf Paulus - wolfpaulus.com. All rights reserved.