package htmlflow.elements;

import java.io.PrintStream;

import htmlflow.HtmlWriter;
import htmlflow.ModelBinder;

/**
 * @author  mcarvalho
 */
public class TextNode<T> implements HtmlWriter<T>{
	
	PrintStream out;
	private final String msg;
	/** 
	 * @uml.property name="binder"
	 * @uml.associationEnd aggregation="shared"
	 */
	private final ModelBinder<T> binder;
	
	public TextNode(String msg) {
		this.msg = msg;
		this.binder = null;
	}
	public TextNode(ModelBinder<T> binder) {
		this.msg = null;
		this.binder = binder;
	}
	@Override
	public void write(int depth, T model) {
		if(binder == null){
			out.print(msg);
		}
		else{
			assert(binder != null);
			binder.bind(out, model);
		}
	}
	@Override
	public HtmlWriter<T> setPrintStream(PrintStream out) {
		this.out = out;
		return this;
	}
}

@@ -240,96 +240,8 @@
 sg;%0A
-%09/** %0A%09 * @uml.property name=%22binder%22%0A%09 * @uml.associationEnd aggregation=%22shared%22%0A%09 */%0A
 %09pri

Remove useless UML comments