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

ArrayStringifier

public final class ArrayStringifier extends Object implements Stringifier

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

		this( SmartStringifier.DEFAULT );
	
public ArrayStringifier(String delim)

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

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

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

		return( this.stringify( (Object [])o, mDelim, mElementStringifier ) );
	
public static java.lang.Stringstringify(java.lang.Object[] o, java.lang.String delim, Stringifier stringifier)

		final Iterator	iter	= Arrays.asList( o ).iterator();
		
		final IteratorStringifier	s	= new IteratorStringifier( delim, stringifier );
		
		return( s.stringify( iter ) );
	
public static java.lang.Stringstringify(java.lang.Object[] o, java.lang.String delim)

		return( stringify( o, delim, SmartStringifier.DEFAULT ) );