package biz.mbisoftware.fn.wstypes; import biz.mbisoftware.common.Constants; /** * Wrapper class for a string array. */ public class StringArray { /** The payload of this class. */ private String[] value; /** * The default parameterless constructor. */ public StringArray( ) { } /** * The constructor with a given payload. * @param value the value to store. */ public StringArray( final String[] value ) { this.value = value; } /** * Get the current value. * @return The current value. */ public String[] getValue() { return this.value; } /** * Set the value attirbute to a new value. * @param value The new value. */ public void setValue( final String[] value ) { this.value = value; } /** * @see Object#toString() * @return a string representation of the object. */ public String toString() { StringBuilder sb = new StringBuilder( Constants.DEFAULT_STRING_BUFFER_SIZE ); sb.append( '[' ); if ( this.value == null ) { sb.append( "null" ); } else { for ( int i = 0; i < this.value.length; i++ ) { sb.append( this.value[i] ); if ( i < this.value.length - 1 ) { sb.append( ',' ); } } } sb.append( ']' ); return sb.toString(); } }