📄 elevatorsimulationevent.java
字号:
// ElevatorSimulationEvent.java
// Basic event packet in Elevator simulation
package com.deitel.jhtp5.elevator.event;
// Deitel packages
import com.deitel.jhtp5.elevator.model.*;
public class ElevatorSimulationEvent {
// Location where ElevatorSimulationEvent was generated
private Location location;
// source Object that generated ElevatorSimulationEvent
private Object source;
// ElevatorModelEvent constructor sets Location
public ElevatorSimulationEvent(Object source, Location location)
{
setSource( source );
setLocation( location );
}
// set ElevatorSimulationEvent Location
public void setLocation( Location eventLocation )
{
location = eventLocation;
}
// get ElevatorSimulationEvent Location
public Location getLocation()
{
return location;
}
// set ElevatorSimulationEvent source
private void setSource( Object eventSource )
{
source = eventSource;
}
// get ElevatorSimulationEvent source
public Object getSource()
{
return source;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -