automotiverobotbuilder.java
来自「程序设计模式java入门源码大全」· Java 代码 · 共 46 行
JAVA
46 行
import java.util.*;
public class AutomotiveRobotBuilder implements RobotBuilder
{
AutomotiveRobotBuildable robot;
ArrayList actions;
public AutomotiveRobotBuilder()
{
robot = new AutomotiveRobotBuildable();
actions = new ArrayList();
}
public void addStart()
{
actions.add(new Integer(1));
}
public void addGetParts()
{
actions.add(new Integer(2));
}
public void addAssemble()
{
actions.add(new Integer(3));
}
public void addTest()
{
actions.add(new Integer(4));
}
public void addStop()
{
actions.add(new Integer(5));
}
public RobotBuildable getRobot()
{
robot.loadActions(actions);
return robot;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?