package lu.tudor.santec.gecamed.core.utils.printing.ireport;

public class StringAppender
{
	/* ======================================== */
	// 		MEMBERS
	/* ======================================== */
	
	StringBuilder builder = new StringBuilder();
	
	
	
	/* ======================================== */
	// 		CONSTRUCTORS
	/* ======================================== */
	
	public StringAppender () { }
	
	
	public StringAppender (Object o)
	{
		append(o);
	}
	
	
	
	/* ======================================== */
	// 		CLASS BODY
	/* ======================================== */
	
	public StringAppender append (Object o)
	{
		if (o != null)
			builder.append(o);
		
		return this;
	}
	
	
	public StringAppender append (boolean o)
	{
		builder.append(o);
		return this;
	}
	
	
	public StringAppender append (char o)
	{
		builder.append(o);
		return this;
	}
	
	
	public StringAppender append (byte o)
	{
		builder.append(o);
		return this;
	}
	
	
	public StringAppender append (short o)
	{
		builder.append(o);
		return this;
	}
	
	
	public StringAppender append (int o)
	{
		builder.append(o);
		return this;
	}
	
	
	public StringAppender append (long o)
	{
		builder.append(o);
		return this;
	}
	
	
	public StringAppender append (float o)
	{
		builder.append(o);
		return this;
	}
	
	
	public StringAppender append (double o)
	{
		builder.append(o);
		return this;
	}
	
	
	@Override
	public String toString()
	{
		return builder.toString();
	}
}
