📄 statistic.java
字号:
package net.aetherial.gis.our.auto.extend;
import net.aetherial.gis.our.auto.Auto;
import net.aetherial.gis.our.FrameOur;
import org.w3c.dom.Node;
import net.aetherial.gis.surface.ItemValue;
import java.util.Vector;
import net.aetherial.gis.dataType.GPSFile;
import java.io.File;
import net.aetherial.gis.surface.CreateFile;
import net.aetherial.gis.dataType.WptType;
import net.aetherial.gis.our.allauto.create.xzc.XzcStatistic;
import net.aetherial.gis.our.allauto.create.xzc.FileXZC;
/**
* <p>Title: </p>
*
* <p>Description: </p>
*
* <p>Copyright: Copyright (c) 2004</p>
*
* <p>Company: </p>
*
* @author not attributable
* @version 1.0
*/
public class Statistic extends Auto{
private long xzcCount = 0;
public Statistic() {
}
public void countAllFile(){
if (super.input == null) {
return;
}
for (int i = 0; i < this.input.length; i++) {
this.open(this.input[i]);
// this.getAFileXZCCount();
this.getAFileXZC(this.input[i].getName());
this.setMemoryReset();
}
}
private void getAFileXZC(String fileName){
Node[] allwpts = ItemValue.getWaypoint();
FileXZC fileXZC = null;
if (allwpts == null) {
return;
}else{
for (int i = 0; i < allwpts.length; i++) {
if (ItemValue.getWaypointKP(allwpts[i]).equals(WptType.W1XingZhengCun)) {
fileXZC = new FileXZC(allwpts[i]);
fileXZC.setFileName(fileName);
fileXZC.setPos(i +1);
XzcStatistic.addXZC(fileXZC);
fileXZC = null;
this.xzcCount++;
}
}
}
}
private void getAFileXZCCount(){
Node[] xzc = ItemValue.getXingZCInWaypoint(ItemValue.getWaypoint());
if (xzc == null) {
return;
}
Vector ve = new Vector();
for (int i = 0; i < xzc.length; i++) {
ve.add(xzc[i]);
// XzcStatistic.addXZC(new FileXZC(xzc[i]));
}
for (int i = 0; i < ve.size(); i++) {
for (int j = (i+1); j < ve.size(); j++) {
if (j == (ve.size() - 1)) {
break;
}
if ((ItemValue.getWaypointName((Node)ve.elementAt(i))).equals(ItemValue.getWaypointName((Node)ve.elementAt(j)))) {
ve.removeElementAt(i);
i--;
if (i < 0) {
i = 0;
}
}
}
}
this.xzcCount = this.xzcCount + ve.size();
}
public long getXZCCount(){
return this.xzcCount;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -