package typo;

import java.util.LinkedList;

public abstract class Group extends Box {
	
	LinkedList<Box> contents = new LinkedList<Box>();
	double ascent;
	double descent;
	double minimalWidth;
	double stretchingCapacity;
	
	public void add(Box b) {
		contents.addLast(b);
	}
	
	public double getAscent() {
		return ascent;
	}
	
	public double getDescent() {
		return descent;
	}
	
	public double getMinimalWidth() {
		return minimalWidth;
	}
	
	public double getStretchingCapacity() {
		return stretchingCapacity;
	}
	
	public String toString() {
		StringBuffer buf = new StringBuffer();
		buf.append(super.toString() + "{");
		for (Box b : contents)
			buf.append("\n  "+b.toString()+",");
		buf.append("\n}");
		return buf.toString();
	}
	
}

