cloudsim-plus-master/cloudsim-plus-master/cloudsim-plus/src/main/java/org/cloudbus/cloudsim/util/WorkloadFileReader.java
private Cloudlet parseTraceLineAndCreateCloudlet(final String line, final int lineNum) {
        // skip a comment line
        if (line.startsWith(comment)) {
            return Cloudlet.NULL;
        }

        final String[] sp = line.split("\\s+"); // split the fields based on a space
        int index = 0; // the index of an array

        // check for each field in the array
        for (final String elem : sp) {
            if (!elem.trim().isEmpty()) {
                fieldArray[index] = elem;
                index++;
            }
        }

        //If all the fields could not be read, don't create the Cloudlet.
        if (index < maxField) {
            return Cloudlet.NULL;
        }

        final Cloudlet c = createCloudletFromTraceLine(fieldArray, lineNum);
        return predicate.test(c) ? c : Cloudlet.NULL;
    }
/**
     * Breaks a line from the trace file into many fields into the
     * {@link #fieldArray} and create a Cloudlet from it
     * if the {@link #setPredicate(Predicate) Predicate} is met
     * and the line is not commented.
     *
     * @param line    a line from the trace file
     * @param lineNum the line number
     * @return the created {@link Cloudlet} or {@link Cloudlet#NULL}
     *         if, after reading the trace line, the conditions
     *         to create the Cloudlet were not met or the line read
     *         was commented.
     * @pre line != null
     * @pre lineNum > 0
     * @post $none
     * @see #setPredicate(Predicate)
     */
Breaks a line from the trace file into many fields into the
#fieldArray and create a Cloudlet from it
if the  #setPredicate(Predicate) Predicate is met
and the line is not commented.

@param line    a line from the trace file
@param lineNum the line number
@return the created  Cloudlet or  Cloudlet#NULL
if, after reading the trace line, the conditions
to create the Cloudlet were not met or the line read
was commented.
@pre line != null
@pre lineNum > 0
@post $none
@see #setPredicate(Predicate)
Breaks a line from the trace file into many fields into the #fieldArray and create a Cloudlet from it if the #setPredicate ( Predicate ) Predicate is met and the line is not commented . @param line a line from the trace file @param lineNum the line number @return the created Cloudlet or Cloudlet#NULL if after reading the trace line the conditions to create the Cloudlet were not met or the line read was commented . @pre line ! = null @pre lineNum > 0 @post $none @see #setPredicate ( Predicate )
private Cloudlet parseTraceLineAndCreateCloudlet(final String line, final int lineNum) {
        if (line.startsWith(comment)) {
            return Cloudlet.NULL;
        }
        final String[] sp = line.split("\\s+"); 
        int index = 0; 
        for (final String elem : sp) {
            if (!elem.trim().isEmpty()) {
                fieldArray[index] = elem;
                index++;
            }
        }
        if (index < maxField) {
            return Cloudlet.NULL;
        }
        final Cloudlet c = createCloudletFromTraceLine(fieldArray, lineNum);
        return predicate.test(c) ? c : Cloudlet.NULL;
    }
private Cloudlet parseTraceLineAndCreateCloudlet ( final String line , final int lineNum ) { if ( line . startsWith ( comment ) ) { return Cloudlet . NULL ; } final String [ ] sp = line . split ( "\\s+" ) ; int index = 0 ; for ( final String elem : sp ) { if ( ! elem . trim ( ) . isEmpty ( ) ) { fieldArray [ index ] = elem ; index ++ ; } } if ( index < maxField ) { return Cloudlet . NULL ; } final Cloudlet c = createCloudletFromTraceLine ( fieldArray , lineNum ) ; return predicate . test ( c ) ? c : Cloudlet . NULL ; }
Breaks a line from the trace file into many fields into the
 {@link #fieldArray} and create a Cloudlet from it
 if the {@link #setPredicate(Predicate) Predicate} is met
 and the line is not commented.
Breaks a line from the trace file into many fields into the { @link #fieldArray } and create a Cloudlet from it if the { @link #setPredicate ( Predicate ) Predicate } is met and the line is not commented .
// skip a comment line // split the fields based on a space // the index of an array // check for each field in the array //If all the fields could not be read, don't create the Cloudlet.