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

org.opencb.commons.run.Task Maven / Gradle / Ivy

There is a newer version: 6.0.0
Show newest version
package org.opencb.commons.run;

import java.io.IOException;
import java.util.List;

/**
 * @author Alejandro Aleman Ramos 
 */
@Deprecated
public abstract class Task implements Comparable> {

    private int priority;

    public Task() {
        this(0);
    }

    public Task(int priority) {
        this.priority = priority;
    }

    public abstract boolean apply(List batch) throws IOException;

    public boolean pre() {
        return true;
    }

    public boolean post() {
        return true;
    }

    public int getPriority() {
        return priority;
    }

    public void setPriority(int priority) {
        this.priority = priority;
    }

    @Override
    public int compareTo(Task elem) {
        return elem.getPriority() - this.priority;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy