コード例 #1
0
 public String[] buldingbean2StringArray(BuldingBean bean) {
   String[] strings = new String[4];
   strings[0] = bean.getId();
   strings[1] = Double.toString(bean.getArea());
   strings[2] = Double.toString(bean.getBaseElectric());
   strings[3] = Double.toString(bean.getAirElectric());
   return strings;
 }
コード例 #2
0
  public svm_node[] buildingBean2SvmNode(BuldingBean buldingBean) {
    // TODO Auto-generated method stub
    svm_node p0 = new svm_node();
    p0.index = 0;
    p0.value = buldingBean.getBaseElectric();

    svm_node p1 = new svm_node();
    p1.index = 1;
    p1.value = buldingBean.getAirElectric();

    svm_node[] p = {p0, p1};
    return p;
  }