org.apache.commons.convert
Class GenericSingletonToList<T>

java.lang.Object
  extended by org.apache.commons.convert.AbstractConverter<T,List<T>>
      extended by org.apache.commons.convert.GenericSingletonToList<T>
All Implemented Interfaces:
Converter<T,List<T>>, ConverterLoader

public class GenericSingletonToList<T>
extends AbstractConverter<T,List<T>>

An object that creates a List and adds an object to the List.


Constructor Summary
GenericSingletonToList(Class<T> sourceClass)
           
 
Method Summary
 List<T> convert(T obj)
          Converts obj to T.
 
Methods inherited from class org.apache.commons.convert.AbstractConverter
canConvert, getSourceClass, getTargetClass, loadConverters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericSingletonToList

public GenericSingletonToList(Class<T> sourceClass)
Method Detail

convert

public List<T> convert(T obj)
                throws ConversionException
Description copied from interface: Converter
Converts obj to T.

Parameters:
obj - The source Object to convert
Returns:
The converted Object
Throws:
ConversionException


Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.