public void printGridletList(boolean history)
    {
        String name = super.get_name();
        int size = list_.size();
        Gridlet gridlet = null;

        String indent = "    ";
        System.out.println();
        System.out.println("========== OUTPUT for " + name + " ==========");
        System.out.println("Gridlet_ID" + indent + "STATUS" + indent +
                "Resource_ID" + indent + "Cost");

        int i = 0;
        for (i = 0; i < size; i++)
        {
            gridlet = list_.get(i);
            System.out.print(indent + gridlet.getGridletID() + indent
                    + indent);

            // get the status of a Gridlet
            System.out.print( gridlet.getGridletStatusString() );
            System.out.println( indent + indent + gridlet.getResourceID() +
                    indent + indent + gridlet.getProcessingCost() );
        }

        System.out.println();
        if (history)
        {
            // a loop to print each Gridlet's history
            System.out.println();
            for (i = 0; i < size; i++)
            {
                gridlet = list_.get(i);
                System.out.println( gridlet.getGridletHistory() );

                System.out.print("Gridlet #" + gridlet.getGridletID() );
                System.out.println(", length = " + gridlet.getGridletLength()
                        + ", finished so far = "
                        + gridlet.getGridletFinishedSoFar() );
                System.out.println("=========================================");
                System.out.println();
            }
        }
    }