org.daisy.dotify.api.tasks.DefaultCompiledTaskSystem Maven / Gradle / Ivy
The newest version!
package org.daisy.dotify.api.tasks;
import java.util.ArrayList;
import java.util.List;
/**
* Provides a default implementation of a compiled task system
* @author Joel Håkansson
*
*/
public class DefaultCompiledTaskSystem extends ArrayList implements CompiledTaskSystem {
/**
*
*/
private static final long serialVersionUID = -5627095028137227428L;
private List options;
private final String name;
/**
* Creates a new compiled task system with the specified name
* @param name the name of the task system
*/
public DefaultCompiledTaskSystem(String name) {
this(name, new ArrayList());
}
/**
* Creates a new compiled task system with the specified name and options
* @param name the name of the task system
* @param options the options
*/
public DefaultCompiledTaskSystem(String name, List options) {
super();
this.options = new ArrayList<>(options);
this.name = name;
}
/**
* Adds an option to the list of options
* @param option the option to add
*/
public void addOption(TaskOption option) {
options.add(option);
}
@Override
public List getOptions() {
return options;
}
@Override
public String getName() {
return name;
}
}