// Mike Maxim
// Trace

package edu.cmu.cs.l3.canon;

import java.util.*;

public class Trace {

    public Trace() {

    }

    public Vector getBlocks() {
	return m_blocks;
    }

    public void addBlock(Block b) {
	m_blocks.addElement(b);
    }

    private Vector m_blocks = new Vector();

    public String toString() {
	String res = "";
	for(int i = 0; i < m_blocks.size(); i++) {
	    res += "" + (m_blocks.get(i));
	}
	return res;
    }
    
    public String toOneLine() {
    	if(m_blocks.isEmpty()) return "";
    	String res = ((Block) m_blocks.get(0)).getLabel().toString();
    	for(int i = 1; i < m_blocks.size(); i++) {
    		res += " " + ((Block) m_blocks.get(i)).getLabel().toString();
    	}
    	return res;
    }

}
