资源简介
http://blog.csdn.net/songxueyu/article/details/36008883里的资源
代码片段和文件信息
package com.question.station;
import java.util.List;
public class InitStations {
public static void init(List allStations){
//初始化换乘车站
TransportStation x1 = new TransportStation();
x1.name=“X1“;
x1.type=StationTypeEnum.Transport;
allStations.add(x1);
TransportStation x2 = new TransportStation();
x2.name=“X2“;
x2.type=StationTypeEnum.Transport;
allStations.add(x2);
TransportStation x3 = new TransportStation();
x3.name=“X3“;
x3.type=StationTypeEnum.Transport;
allStations.add(x3);
TransportStation x4 = new TransportStation();
x4.name=“X4“;
x4.type=StationTypeEnum.Transport;
allStations.add(x4);
TransportStation x5 = new TransportStation();
x5.name=“X5“;
x5.type=StationTypeEnum.Transport;
allStations.add(x5);
TransportStation x6 = new TransportStation();
x6.name=“X6“;
x6.type=StationTypeEnum.Transport;
allStations.add(x6);
TransportStation x7 = new TransportStation();
x7.name=“X7“;
x7.type=StationTypeEnum.Transport;
allStations.add(x7);
TransportStation x8 = new TransportStation();
x8.name=“X8“;
x8.type=StationTypeEnum.Transport;
allStations.add(x8);
//初始化1号线
NormalStation[] line1 = new NormalStation[14];
for(int i = 1; i<=14;i++){
NormalStation s = new NormalStation();
String name = “L1-“+i;
s.name=name;
s.type=StationTypeEnum.Normal;
line1[i-1] = s;
allStations.add(s);
}
for(int i = 0; i<13;i++){
line1[i].next = line1[i+1];
}
line1[13].next = line1[0];
for(int i=13; i>0;i--){
line1[i].prev = line1[i-1];
}
line1[0].prev = line1[13];
//设置1号线上的换乘车站
line1[2-1].next = x1;
x1.stations.add(line1[2-1]);
x1.stations.add(line1[3-1]);
line1[3-1].prev = x1;
line1[4-1].next = x2;
x2.stations.add(line1[4-1]);
x2.stations.add(x3);
x3.stations.add(x2);
x3.stations.add(line1[5-1]);
line1[5-1].prev=x3;
line1[7-1].next=x8;
x8.stations.add(line1[7-1]);
x8.stations.add(line1[8-1]);
line1[8-1].prev=x8;
line1[10-1].next=x7;
x7.stations.add(line1[10-1]);
x7.stations.add(line1[11-1]);
line1[11-1].prev=x7;
line1[11-1].next=x5;
x5.stations.add(line1[11-1]);
x5.stations.add(line1[12-1]);
line1[12-1].prev=x5;
line1[13-1].next=x6;
x6.stations.add(line1[13-1]);
x6.stations.add(line1[14-1]);
line1[14-1].prev=x6;
//初始化2号线
NormalStation[] line2 = new NormalStation[16];
for(int i = 1; i<=16;i++){
NormalStation s = new NormalStation();
String name = “L2-“+i;
s.name=name;
s.type=StationTypeEnum.Normal;
line2[i-1] = s;
allStations.add(s);
}
for(int i = 0; i<15;i++){
line2[i].next=line2[i+1];
}
for(int i = 15; i>0;i--){
line2[i].prev = line2[i-1];
}
//设置2号线上的换乘车站
line2[8-1].next=x2;
x2.stations.add(line2[8-1]);
x2.stations.add(x4);
x4.stations.add(x2);
x4.stations.add(line2[9-1]);
line2[9-1].prev=x4;
line2[12-1].next=x6;
x6.stations.add(line2
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 301 2014-06-29 10:48 station\.classpath
文件 383 2014-06-29 10:48 station\.project
文件 598 2014-06-29 10:48 station\.settings\org.eclipse.jdt.core.prefs
文件 5670 2014-06-29 14:10 station\bin\com\question\station\InitStations.class
文件 4028 2014-06-30 16:35 station\bin\com\question\station\Main.class
文件 381 2014-06-29 10:56 station\bin\com\question\station\NormalStation.class
文件 485 2014-06-29 10:52 station\bin\com\question\station\Station.class
文件 1068 2014-06-29 10:51 station\bin\com\question\station\StationTypeEnum.class
文件 495 2014-06-29 12:37 station\bin\com\question\station\TransportStation.class
文件 4 2014-06-29 15:57 station\out.txt
文件 5646 2014-06-29 14:10 station\src\com\question\station\InitStations.java
文件 2723 2014-06-30 16:35 station\src\com\question\station\Main.java
文件 128 2014-06-29 10:56 station\src\com\question\station\NormalStation.java
文件 166 2014-06-29 10:52 station\src\com\question\station\Station.java
文件 86 2014-06-29 10:51 station\src\com\question\station\StationTypeEnum.java
文件 193 2014-06-29 12:37 station\src\com\question\station\TransportStation.java
目录 0 2014-06-30 16:13 station\bin\com\question\station
目录 0 2014-06-30 16:13 station\src\com\question\station
目录 0 2014-06-29 10:50 station\bin\com\question
目录 0 2014-06-29 10:50 station\src\com\question
目录 0 2014-06-29 10:50 station\bin\com
目录 0 2014-06-29 10:50 station\src\com
目录 0 2014-06-29 10:48 station\.settings
目录 0 2014-06-29 10:50 station\bin
目录 0 2014-06-29 10:50 station\src
目录 0 2014-06-29 15:55 station
----------- --------- ---------- ----- ----
22355 26
- 上一篇:51单片机播放音乐、电子琴、快进
- 下一篇:webplugin.exe
相关资源
- VMware workstation 16 最新版本安装包,
- vmwareworkstationpro15.0.2.txt
- VMware-Workstation-Full-15.0.3-12422535.x86_64
- VMware Workstation v6.5.Keygen FOR ACE
- Arcinfo Workstation基本操作
- MicroStation V8i视频教程
- Bentley MicroStation CONNECT版Update410.00.00
- VMware-workstation-full-12.5.7-5813279
- ArcInfo_WorkStation10.txt
- 虚拟机VMware Workstation Pro 15.0.0及永久激
- VMware Workstation Pro 12 注册机 完美版
- VMware Workstation 8.0.0... 有效激活密钥
- 全国气象站stations.zip
- Multifractal detrended cross-correlation analy
- VMware Workstation Pro15激活密钥
- Asymptotic stability of stationarysolutions to
- TerraSolid for Microstation V8i
- Highly Enantioselective HPLC Separation of 5-M
- VM10的黑苹果补丁Unlocker for VMware work
- VMware-Workstation-8-Keygen 注册机和序列号
- Realtek_Audio Console_1.2.169.0(station-driv
- VMware-workstation-full-14.1.1
- macOS MojaveVM虚拟机 磁盘全文件,需
- VMware Workstation 10 密钥
- ArcGIS 文件转换工具(ArcGIS_ArcInfo_9.3
- vmware workstation oem bios lenovo
- VMware-workstation-full-8.0.0-471780 正式版
- VMware-workstation-full-10.0.0-1295980 序列号
- niagara练习站点
- VMware Workstation 15 Pro
评论
共有 条评论