package saccubus;

import java.io.File;

public class FFmpegSelectedItem {
	private final int Index;

	private final File File;

	private final String Name;

	FFmpegSelectedItem(int index, File file, String name) {
		Index = index;
		File = file;
		if (name == null) {
			String tmp = file.getName();
			Name = tmp.substring(0, tmp.lastIndexOf("."));
		} else {
			Name = name;
		}
	}

    @Override
	public String toString() {
		return Name;
	}

	File getFile() {
		return File;
	}

	/**
	 * 識別に使う
	 *
	 * @return
	 */
	int getIndex() {
		return Index;
	}
}
