com.taco.text
Class CollectionToStringConverter

java.lang.Object
  extended by com.taco.text.AbstractObjectToStringConverter
      extended by com.taco.text.CollectionToStringConverter
All Implemented Interfaces:
IObjectToStringConverter, IObjectMapper

public class CollectionToStringConverter
extends AbstractObjectToStringConverter

A converter from collections to strings that uses StringListUtilities.createCollectionString() to do the conversion.


Field Summary
protected  java.util.Map _options
          The options passed to StringListUtilities.createCollectionString().
static CollectionToStringConverter DEFAULT_INSTANCE
          A well-known instance of this class, which uses the default options.
 
Constructor Summary
CollectionToStringConverter()
          Construct a new instance that uses the default options.
CollectionToStringConverter(java.util.Map options)
          Construct a new instance that uses the argument options for StringListUtilities.createCollectionString().
 
Method Summary
 java.lang.String toString(java.lang.Object obj)
           
 
Methods inherited from class com.taco.text.AbstractObjectToStringConverter
map
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_options

protected final java.util.Map _options
The options passed to StringListUtilities.createCollectionString().


DEFAULT_INSTANCE

public static final CollectionToStringConverter DEFAULT_INSTANCE
A well-known instance of this class, which uses the default options.

Constructor Detail

CollectionToStringConverter

public CollectionToStringConverter()
Construct a new instance that uses the default options. This is public so that an instance can be created through reflection.


CollectionToStringConverter

public CollectionToStringConverter(java.util.Map options)
Construct a new instance that uses the argument options for StringListUtilities.createCollectionString(). The argument map is copied so it may be modified after this constructor executes. If the argument map is null, the default options will be used.

Method Detail

toString

public final java.lang.String toString(java.lang.Object obj)
Specified by:
toString in interface IObjectToStringConverter
Specified by:
toString in class AbstractObjectToStringConverter