FileDocCategorySizeDatePackage
CollectionStringifier.javaAPI DocGlassfish v2 API3368Fri May 04 22:31:06 BST 2007com.sun.appserv.management.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 );
	
public static java.lang.StringtoString(java.lang.Object o, java.lang.String delim)

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