📄 repeatentirely.java
字号:
package net.aetherial.gis.our.auto.check.repeatwpt;
import org.w3c.dom.*;
import net.aetherial.gis.surface.ItemValue;
/**
* <p>Title: </p>
*
* <p>Description:完全相同的航点 名称、属性、坐标相同</p>
*
* <p>Copyright: Copyright (c) 2004</p>
*
* <p>Company: </p>
*
* @author not attributable
* @version 1.0
*/
public class RepeatEntirely {
Node[] allwpt = null;
private String n = "";
private int sameCount = 0;
public RepeatEntirely() {
}
public void checkAll(){
allwpt = ItemValue.getWaypoint();
if (allwpt != null) {
for (int i = 0; i < allwpt.length; i++) {
for (int j = i + 1; j< allwpt.length; j++) {
if (this.isSame(allwpt[i],allwpt[j])) {
n = n + "<" + ItemValue.getWaypointName(allwpt[i]) + ">["+(i+1)+"与"+(j+1)+"]";
sameCount++;
}
}
}
if (!(n.equals(""))) {
this.n = "\"\",\"\",\"\",\"\",文件<" + ItemValue.fileName + ">里有" + this.sameCount + "个完全重复的航点.航点名称为:" + n +"\r\n";
}
}
}
/**
* 判断是否完全相同
*/
private boolean isSame(Node w1,Node w2){
String w1name = ItemValue.getWaypointName(w1);
String w2name = ItemValue.getWaypointName(w2);
String w1KP = ItemValue.getWaypointKP(w1);
String w2KP = ItemValue.getWaypointKP(w2);
String w1X = ItemValue.getWaypointX(w1);
String w2X = ItemValue.getWaypointX(w2);
String w1Y = ItemValue.getWaypointY(w1);
String w2Y = ItemValue.getWaypointY(w2);
String w1Z = ItemValue.getWaypointZ(w1);
String w2Z = ItemValue.getWaypointZ(w2);
if ((w1name.equals(w2name))&&(w1KP.equals(w2KP))&&(w1X.equals(w2X))&&(w1Y.equals(w2Y))&&(w1Z.equals(w2Z)) ) {
return true;
}else{
return false;
}
}
public String getN(){
return this.n ;
}
public void reset(){
this.n ="";
this.sameCount = 0;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -