cloudsim-plus-master/cloudsim-plus-master/cloudsim-plus-examples/src/main/java/org/cloudbus/cloudsim/examples/power/util/Helper.java
public void writeDataToFile(List<? extends Number> data, String outputPath) {
        File file = new File(outputPath);
        try {
            file.createNewFile();
        } catch (IOException e1) {
            e1.printStackTrace();
            System.exit(0);
        }
        try {
            BufferedWriter writer = new BufferedWriter(new FileWriter(file));
            for (Number value : data) {
                writer.write(value.toString() + "\n");
            }
            writer.close();
            System.out.format("File %s created.\n", outputPath);
        } catch (IOException e) {
            e.printStackTrace();
            System.exit(0);
        }
    }
/**
     * Write the data from a given list of numbers to a file,
     * one value per line.
     *
     * @param data       the list of numbers to be saved to the file
     * @param outputPath the path of the file to save the data
     */
Write the data from a given list of numbers to a file,
one value per line.

@param data       the list of numbers to be saved to the file
@param outputPath the path of the file to save the data
Write the data from a given list of numbers to a file one value per line . @param data the list of numbers to be saved to the file @param outputPath the path of the file to save the data
public void writeDataToFile(List<? extends Number> data, String outputPath) {
        File file = new File(outputPath);
        try {
            file.createNewFile();
        } catch (IOException e1) {
            e1.printStackTrace();
            System.exit(0);
        }
        try {
            BufferedWriter writer = new BufferedWriter(new FileWriter(file));
            for (Number value : data) {
                writer.write(value.toString() + "\n");
            }
            writer.close();
            System.out.format("File %s created.\n", outputPath);
        } catch (IOException e) {
            e.printStackTrace();
            System.exit(0);
        }
    }
public void writeDataToFile ( List < ? extends Number > data , String outputPath ) { File file = new File ( outputPath ) ; try { file . createNewFile ( ) ; } catch ( IOException e1 ) { e1 . printStackTrace ( ) ; System . exit ( 0 ) ; } try { BufferedWriter writer = new BufferedWriter ( new FileWriter ( file ) ) ; for ( Number value : data ) { writer . write ( value . toString ( ) + "\n" ) ; } writer . close ( ) ; System . out . format ( "File %s created.\n" , outputPath ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; System . exit ( 0 ) ; } }
Write the data from a given list of numbers to a file,
 one value per line.
Write the data from a given list of numbers to a file one value per line .