⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xiangzhentdarray.java

📁 基于Java的地图数据管理软件。使用MySQL数据库管理系统。
💻 JAVA
字号:
package net.aetherial.gis.jiaotongbu.outputJTB.txtOutput.module.array;

import net.aetherial.gis.jiaotongbu.outputJTB.txtOutput.module.gpsdata.tongda.
    XiangzhenTD;
import java.util.Vector;

/**
 * <p>Title: </p>
 *
 * <p>Description: </p>
 *
 * <p>Copyright: Copyright (c) 2004</p>
 *
 * <p>Company: </p>
 *
 * @author not attributable
 * @version 1.0
 */
public class XiangzhenTDArray {
  public XiangzhenTDArray() {
  }

  public static XiangzhenTD[] getNewXiangzhenTD(XiangzhenTD[] td1,
                                                XiangzhenTD[] td2) {
    if (td1 == null) {
      return td2;
    }
    else if (td2 == null) {
      return td1;
    }
    XiangzhenTD[] temp = new XiangzhenTD[td1.length + td2.length];
    for (int i = 0; i < temp.length; i++) {
      if (i < td1.length) {
        temp[i] = td1[i];
      }
      else {
        temp[i] = td2[i - td1.length];
      }
    }
//    return temp;
    return gidRidOfRepeate(temp);
  }

  private static XiangzhenTD[] gidRidOfRepeate(XiangzhenTD[] td) {
    if (td == null) {
      return null;
    }
    Vector ve = new Vector();
    boolean isSame = false;
    for (int i = 0; i < td.length; i++) {
      isSame = false;
      for (int j = i+1; j < td.length; j++) {
        if ( (td[i].isSame(td[j]))) {
          isSame = true;
          break;
        }
      }
      if (!isSame) {
        ve.addElement(td[i]);
      }
    }
    XiangzhenTD[] temp = new XiangzhenTD[ve.size()];
    for (int i = 0; i < temp.length; i++) {
      temp[i] = (XiangzhenTD) ve.elementAt(i);
    }
    return temp;
  }

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -