Code example for LinkedList

0
import java.util.List; 
 
import fitnesse.testsystems.TestSummary; 
 
public class MockResultFormatter implements ResultFormatter { 
  public List<PageResult> results = new LinkedList<PageResult>();
  public TestSummary finalSummary;
  public StringBuffer output = new StringBuffer("Mock Results:\n");
 
  public void acceptResult(PageResult result) {
    results.add(result);
    output.append(result.toString());
  } 
 
  public void acceptFinalCount(TestSummary testSummary) {
    finalSummary = testSummary;
    output.append("Finals Counts: " + testSummary.toString());
  } 
 
  public int getByteCount() { 
    return output.toString().getBytes().length;