📄 test.java
字号:
/* * Test.java * * Created on 2003年11月5日, 下午9:19 */package romulus;/** * This class is used to represent a test. * @author Romulus * @version 1.0 */public class Test implements RomulusNode, java.io.Serializable{ /** The ident of the Test.*/ private String ident = null; /** The timing of the Test in ms. * 0 means no timing. */ private long timing = 0; /** The title of the Test.*/ private String title = null; /** question group.*/ private java.util.Vector questions = new java.util.Vector(); /** Creates a new instance of Test */ Test(String id, long ti, String tit) throws RomulusException{ if(id == null){ throw new RomulusException(RomulusException.IdentError); } if(ti < 0){ throw new RomulusException(RomulusException.TimingError); } ident = id; timing = ti; title = tit; } /** Add the questions.*/ void add(Question que){ questions.add(que); } /** Remove the question.*/ boolean remove(Question que){ return questions.remove(que); } /** Get questions' iterator.*/ public java.util.Iterator questionIterator(){ return questions.iterator(); } /** Get test size.*/ public int size(){ return questions.size(); } public String getIdent(){ return ident; } public long getTiming(){ return timing; } public String getTitle(){ return title; } /** The method used to accept the Visitor to do something. */ public void Accept(Visitor v) throws java.sql.SQLException, RomulusException{ v.VisitTest(this); } }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -