Code example for Stack

Methods: peek, pop, push

0
 
	/** 
	 * Returns the SyndElement that comes after the top element of the tagstack. 
	 */ 
	public SyndElement getSecondTag() { 
		SyndElement top = tagstack.pop(); 
		SyndElement second = tagstack.peek(); 
		tagstack.push(top); 
		return second; 
	} 
 
	public SyndElement getThirdTag() { 
		SyndElement top = tagstack.pop(); 
		SyndElement second = tagstack.pop(); 
		SyndElement third = tagstack.peek(); 
		tagstack.push(second); 
		tagstack.push(top); 
		return third; 
	} 
 
	public StringBuffer getContentBuf() {