⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 template.java

📁 著名的开源仿真软件yale
💻 JAVA
字号:
/* *  YALE - Yet Another Learning Environment *  Copyright (C) 2002, 2003 *      Simon Fischer, Ralf Klinkenberg, Ingo Mierswa,  *          Katharina Morik, Oliver Ritthoff *      Artificial Intelligence Unit *      Computer Science Department *      University of Dortmund *      44221 Dortmund,  Germany *  email: yale@ls8.cs.uni-dortmund.de *  web:   http://yale.cs.uni-dortmund.de/ * *  This program is free software; you can redistribute it and/or *  modify it under the terms of the GNU General Public License as  *  published by the Free Software Foundation; either version 2 of the *  License, or (at your option) any later version.  * *  This program is distributed in the hope that it will be useful, but *  WITHOUT ANY WARRANTY; without even the implied warranty of *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *  General Public License for more details. * *  You should have received a copy of the GNU General Public License *  along with this program; if not, write to the Free Software *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 *  USA. */package edu.udo.cs.yale.gui;import java.io.File;import java.io.IOException;import java.io.FileReader;import java.io.BufferedReader;import java.util.List;import java.util.LinkedList;/** A template experiment consisting of name, short description, a name for an experiment file and a *  list parameters given as String pairs (operator, key). *  Templates must look like this: *  <pre> *  one line for the name *  one line of html description *  one line for the experiment file name *  Rest of the file: some important parameters in the form operatorname.parametername *  </pre> */public class Template {    private String name = "unnamed";    private String description = "none";    private String configFile;    private List parameters = new LinkedList();    public Template() {}    public Template(File file) throws IOException {	BufferedReader in = new BufferedReader(new FileReader(file));	name        = in.readLine();	description = in.readLine();	configFile  = in.readLine();	String line = null;	while ((line = in.readLine()) != null) {	    parameters.add(line.split("\\."));	}	in.close();    }    public String getFilename() {	return configFile;    }    public String getName() {	return name;    }    public String getDescription() {	return description;    }    public List getParameters() {	return parameters;    }    public String toHTML() {	return "<b>"+name+"</b><br>"+description;    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -