All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.microsoft.bingads.v13.internal.bulk.ReplaceNullsWithEmptyStringCSVEntryConverter Maven / Gradle / Ivy

Go to download

The Bing Ads Java SDK is a library improving developer experience when working with the Bing Ads services by providing high-level access to features such as Bulk API, OAuth Authorization and SOAP API.

There is a newer version: 13.0.22.1
Show newest version
package com.microsoft.bingads.v13.internal.bulk;

import com.googlecode.jcsv.writer.CSVEntryConverter;

/**
 * An entry converter which replaces nulls in the input with empty strings
 *
 */
class ReplaceNullsWithEmptyStringCSVEntryConverter implements CSVEntryConverter {

    @Override
    public String[] convertEntry(String[] values) {
        String[] resultValues = new String[values.length];

        for (int i = 0; i < values.length; i++) {
            if (values[i] == null) {
                resultValues[i] = "";
            } else {
                resultValues[i] = values[i];
            }
        }

        return resultValues;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy