All pastes #2107905 Raw Edit

Untitled

public java v1 · immutable
#2107905 ·published 2012-01-30 22:10 UTC
rendered paste body
package test;import java.util.*;public class Attribute {		private String Name;	private List<StyleAttrib> Style;	private String OpenTag;	private String CloseTag;			public Attribute()	{		this.Name = "html";		this.OpenTag = "<" +this.Name+">";		this.CloseTag = "</" +this.Name+">"; /*To escape the first /*/						}		public Attribute(String Name){		this.Name = Name;		this.OpenTag = "<" +this.Name+"/>";		this.CloseTag = "";			}		public Attribute(String Name,String StyleTag,String StyleValue)	{			this.Name = Name;		List<StyleAttrib> Style = this.Style;		this.OpenTag = "<" +this.Name+">";		this.CloseTag = "</" +this.Name+">"; /*To escape the first /*/		StyleAttrib tempStyle= new StyleAttrib (StyleTag,StyleValue);		Style.add(tempStyle);//this.Style.add(tempStyle);	}		public String printTags(){				String Tags;		Tags = this.OpenTag+this.CloseTag;		return Tags;			}public String printStyle(){	String style = "style='";			style =style + "'";	return style;}	public String printTags(Attribute NestedAttrib){ // for Polymorphism - this allows the print tags to print tags inside tags - Yo Dawg!...				String Tags;		Tags = this.OpenTag+NestedAttrib.printTags()+this.CloseTag;		return Tags;	}}