package turgen.plugin;

import turgen.generator.PulseCrate;
import turgen.playlist.AbstractPlayListItem;

/**Polozka playlistu pro "diskretni zaznamy turbo", tj. Chainloader a KBlock*/
public class SimplePlaylistItem extends AbstractPlayListItem {
    
    public int[] pauses=null;
    /**Jmeno souboru do TURBO HLAVICKY*/
    public String fname=null;
    
    
    public SimplePlaylistItem(String inF,String outF,PulseCrate speed,String fname,int[] pauses) {
        this.inFile=inF;
        this.outFile=outF;
        this.pulses=speed;
        this.pauses=pauses;
        this.fname=fname;
    }
    
    public String toString() {
        return fname;
    }
    
    /**Prazdna instance*/
    public SimplePlaylistItem() {
        
    }
    
    public boolean validate() {
        if (this.inFile==null) return false;
        if (this.outFile==null) this.outFile="";
        if (this.fname==null) this.fname="NONAME";
        if (this.pulses==null) return false;
        if (this.pauses==null) pauses=new int[0];
        return true;
    }
    
}
