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

org.opencb.biodata.tools.commons.Converter Maven / Gradle / Ivy

There is a newer version: 3.3.0
Show newest version
/*
 * 
 *
 */

/**
 * 
 */
package org.opencb.biodata.tools.commons;

import org.opencb.commons.run.ParallelTaskRunner;

import java.util.ArrayList;
import java.util.List;

/**
 * @author Matthias Haimel [email protected]
 *
 */
public interface Converter extends ParallelTaskRunner.Task {

    TO convert(FROM from);

    default List apply(List from) {
        List convertedBatch = new ArrayList<>(from.size());
        for (FROM item: from) {
            convertedBatch.add(convert(item));
        }
        return convertedBatch;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy