readqiaoliang.java

来自「基于Java的地图数据管理软件。使用MySQL数据库管理系统。」· Java 代码 · 共 66 行

JAVA
66
字号
package net.aetherial.gis.jiaotongbu.input.jxl;

import net.aetherial.gis.jiaotongbu.outputJTB.txtOutput.module.excel.ReadRecord;
import net.aetherial.gis.jiaotongbu.outputJTB.txtOutput.module.excel.SheetItem;
import net.aetherial.gis.jiaotongbu.input.type.Qiaoliang;
import net.aetherial.gis.jiaotongbu.input.publicuse.Permanence;
import jxl.Cell;

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

  public ReadQiaoliang(String heduiQiaoliangFile) {
    super(null);
    SheetItem si = new SheetItem();
    si.setQiaoLiang(heduiQiaoliangFile);
    this.setSheet(si.getSheet_ql());
    if (this.mySheet == null) {
      System.out.println("没有桥梁核对表格。");
      try {
        Thread.sleep(2000);
      }
      catch (InterruptedException ex) {
      }
      System.exit(0);
    }
    this.setRow(2);

  }

  public void read() {
    Qiaoliang ql = null;
//    System.out.println(this.mySheet.getRows());
//    System.out.println(this.mySheet.getColumns());
    for (int i = 0; (!this.isEmptyrow()) && i <= this.mySheet.getRows(); i++) {
      if (this.rowData != null && this.rowData.length >= 13) {
        ql = new Qiaoliang();
        ql.setValue(this.rowData);
        Permanence.heduidata_QL.add(ql);
      }
      this.moveNext();
    }
//    System.exit(0);
    this.printHeduidata_QL();
  }

  public static void printHeduidata_QL() {
    for (int i = 0; i < Permanence.heduidata_QL.size(); i++) {
      System.out.println( (Qiaoliang) Permanence.heduidata_QL.get(i) + "" +
                         ( (Qiaoliang) Permanence.heduidata_QL.get(i)).
                         isNianBao());
    }
  }
}

⌨️ 快捷键说明

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