打字猴:1.700473093e+09
1700473093
1700473094 public class Lift implements ILift{
1700473095
1700473096 private int state;
1700473097
1700473098 public void setState(int state){
1700473099
1700473100 this.state=state;
1700473101
1700473102 }
1700473103
1700473104 //电梯门关闭
1700473105
1700473106 public void close(){
1700473107
1700473108 //电梯在什么状态下才能关闭
1700473109
1700473110 switch(this.state){
1700473111
1700473112 case OPENING_STATE://可以关门,同时修改电梯状态
1700473113
1700473114 this.closeWithoutLogic();
1700473115
1700473116 this.setState(CLOSING_STATE);
1700473117
1700473118 break;
1700473119
1700473120 case CLOSING_STATE://电梯是关门状态,则什么都不做
1700473121
1700473122 //do nothing;
1700473123
1700473124 break;
1700473125
1700473126 case RUNNING_STATE://正在运行,门本来就是关闭的,也什么都不做
1700473127
1700473128 //do nothing;
1700473129
1700473130 break;
1700473131
1700473132 case STOPPING_STATE://停止状态,门也是关闭的,什么也不做
1700473133
1700473134 //do nothing;
1700473135
1700473136 break;
1700473137
1700473138 }
1700473139
1700473140 }
1700473141
1700473142 //电梯门开启
[ 上一页 ]  [ :1.700473093e+09 ]  [ 下一页 ]