FileDocCategorySizeDatePackage
CollectionStringifier.javaAPI DocGlassfish v2 API3087Fri May 04 22:25:02 BST 2007com.sun.cli.util.stringifier

CollectionStringifier

public class CollectionStringifier extends Object implements Stringifier

Fields Summary
public static final CollectionStringifier
DEFAULT
public final String
mDelim
public final Stringifier
mElementStringifier
Constructors Summary
public CollectionStringifier(String delim)

	
		 
	   
	
		this( delim, SmartStringifier.DEFAULT );
	
public CollectionStringifier(Stringifier elementStringifier)

		this( ",", elementStringifier );
	
public CollectionStringifier(String delim, Stringifier elementStringifier)

		mDelim				= delim;
		mElementStringifier	= elementStringifier;
	
Methods Summary
public java.lang.Stringstringify(java.lang.Object o)

		final Collection	c		= (Collection)o;
		final Iterator		iter	= c.iterator();
		
		String	result	= IteratorStringifier.DEFAULT.stringify( iter, mDelim, mElementStringifier);
		
		return( result );