package ca.quine.jcommons.sourceexporter.test.resources;

import java.util.HashMap;
import java.util.Map;

public class CreateListOfNodes {

  public ca.quine.jcommons.sourceexporter.test.Node createNode2(
      Map alreadySeenMap)
  {
    ca.quine.jcommons.sourceexporter.test.Node retVal = new ca.quine.jcommons.sourceexporter.test.Node();
    alreadySeenMap.put(new Integer(2), retVal);

    retVal.setNodeName("First Node");

    return retVal;
  }

  public ca.quine.jcommons.sourceexporter.test.Node createNode3(
      Map alreadySeenMap)
  {
    ca.quine.jcommons.sourceexporter.test.Node retVal = new ca.quine.jcommons.sourceexporter.test.Node();
    alreadySeenMap.put(new Integer(3), retVal);

    retVal.setNodeName("Second Node");

    return retVal;
  }

  public ca.quine.jcommons.sourceexporter.test.Node createNode4(
      Map alreadySeenMap)
  {
    ca.quine.jcommons.sourceexporter.test.Node retVal = new ca.quine.jcommons.sourceexporter.test.Node();
    alreadySeenMap.put(new Integer(4), retVal);

    retVal.setNodeName("Third Node");

    return retVal;
  }

  public java.util.ArrayList createArrayList1(Map alreadySeenMap) {
    java.util.ArrayList retVal = new java.util.ArrayList();
    alreadySeenMap.put(new Integer(1), retVal);

    retVal.add(createNode2(alreadySeenMap));
    retVal.add(createNode3(alreadySeenMap));
    retVal.add(createNode4(alreadySeenMap));

    return retVal;
  }

  public java.util.List createList() {
    Map alreadySeenMap = new HashMap();

    return createArrayList1(alreadySeenMap);
  }

}