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

📄 dataset.java

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

/**
 * <p>Title: </p>
 *
 * <p>Description: </p>
 *
 * <p>Copyright: Copyright (c) 2004</p>
 *
 * <p>Company: </p>
 *
 * @author not attributable
 * @version 1.0
 */
public class DataSet {
  /**
   * 列的标题
   */
  public String[] header = null;

  /**
   * 数据
   */
  public Object[][] data = null;

  public  int column = 0,row = 0;
  public DataSet() {
  }

  /**
   * 得到列的数目
   */
  public int getColumn(){
    return column;
  }

  /**
   * 得到行的数目
   */
  public int getRow(){
    return row;
  }

  /**
   * 得到一行的数据
   */
  public Object[] getRowData(int row){
    return this.data[row];
  }

  /**
   * 添加列
   */
  public void addColumn(String columnName){
    column++;
    if (this.header == null) {
      this.header = new String[1];
      this.header[0] = columnName;
    }else{
      String[] temp = new String[column];
      for (int i = 0; i < (column-1); i++) {
        temp[i] = this.header[i];
      }
      temp[column-1] = columnName;
      this.header = temp;
    }
  }

  /**
   * 添加数据
   */
  public void addData(Commonness jtb){
    row++;
    if (this.data == null) {
      this.data = new Object[1][column];
      this.data[0] = jtb.getContent();
    }else{
      Object[][] temp = new Object[row][column];
      for (int i = 0; i < (row-1); i++) {
        temp[i] = this.data[i];
      }
      temp[row-1] = jtb.getContent();
      this.data = temp;
    }
  }

}

⌨️ 快捷键说明

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