📄 bubaoqiaoliang.java
字号:
package net.aetherial.gis.jiaotongbu.output.tocheck.type;
/**
* <p>Title: </p>
*
* <p>Description: </p>
*
* <p>Copyright: Copyright (c) 2004</p>
*
* <p>Company: </p>
*
* @author not attributable
* @version 1.0
*/
public class BubaoQIaoliang
extends BubaoTable {
private String kongshu = "";
private String kuadu = "";
private String jianchengshijian = "";
private String shejihezai = "";
private String jianzhucailiao = "";
private String shifouweiqiao = "";
public BubaoQIaoliang() {
}
public String getShifouweiqiao() {
shifouweiqiao = shifouweiqiao.trim();
if (shifouweiqiao.equals("1")) {
return "是";
}
else {
return "否";
}
}
public String getJianzhucailiao() {
jianzhucailiao = jianzhucailiao.trim();
if (jianzhucailiao.equals("1")) {
return "永久性";
}
else if (jianzhucailiao.equals("2")) {
return "半永久性";
}
else if (jianzhucailiao.equals("3")) {
return "临时性";
}
else {
return "永久性";
}
}
public String getShejihezai() {
/**
* 公路-II级
* 公路-I级
* 其他
*/
shejihezai = shejihezai.trim();
if (shejihezai.equals("1")) {
return "公路-I级";
}
else if (shejihezai.equals("2")) {
return "公路-II级";
}
else {
return "其他";
}
}
public String getJianchengshijian() {
return jianchengshijian;
}
public String getKuadu() {
return kuadu;
}
public String getKuajinfenlei() {
this.kuadu = this.kuadu.trim();
if (this.kuadu.equals("")) {
this.kuadu = "0";
}
double temp = 0;
try {
temp = Double.parseDouble(this.kuadu.trim());
}
catch (NumberFormatException ex) {
System.err.println("Error in gis.jiaotongbu.output.tocheck.type.BubaoQiaoliang.getKuajinfenlei():" + this.getMingcheng() + " , "+ this.getLxBianma() + ex.getMessage());
}
// if (this.getMingcheng().trim().equals("老井潭桥")) {
// System.out.println("***********************temp ==" + temp);
// }
if (temp > 1000) {
return "特大桥";
}
else if (1000 >= temp && temp > 100) {
return "大桥";
}
else if (100 >= temp && temp > 30) {
return "中桥";
}
else {
return "小桥";
}
}
public String getStringXingzhi(String caiLiao) {
if ("1|2|3|永久性|半永久性|临时性".indexOf(caiLiao) < 0) {
return "永久性";
}
else {
if (caiLiao.indexOf("3") != -1) {
return "临时性";
}
else if (caiLiao.indexOf("2") != -1) {
return "半永久性";
}
else if (caiLiao.indexOf("1") != -1) {
return "半永久性";
}
else {
return caiLiao;
}
}
}
public String getLxBianma() {
if (this.getBianma().equals("")) {
return "";
}
else {
try {
return this.getBianma().substring(0, 10);
}
catch (Exception ex) {
return "";
}
}
}
public String getKongshu() {
if (kongshu.trim().equals("1")) {
return "单孔";
}
else if (kongshu.trim().equals("2")) {
return "多孔";
}
else {
return kongshu;
}
}
public void setShifouweiqiao(String shifouweiqiao) {
this.shifouweiqiao = shifouweiqiao;
}
public void setJianzhucailiao(String jianzhucailiao) {
this.jianzhucailiao = jianzhucailiao;
}
public void setShejihezai(String shejihezai) {
this.shejihezai = shejihezai;
}
public void setJianchengshijian(String jianchengshijian) {
this.jianchengshijian = jianchengshijian;
}
public void setKuadu(String kuadu) {
this.kuadu = kuadu;
}
public void setKongshu(String kongshu) {
this.kongshu = kongshu;
}
public boolean isXYZInThis(String x1, String y1) {
if (y.length() > 3 && y1.indexOf(y.substring(0, y.length() - 1)) > -1 &&
x.length() > 3 && x1.indexOf(x.substring(0, x.length() - 1)) > -1) {
return true;
}
else {
return false;
}
}
public static void main(String args[]){
BubaoQIaoliang ql = new BubaoQIaoliang();
for (int i = 0; i < 500; i++) {
ql.setKuadu("" + i);
System.out.println(i + ":" + ql.getKuajinfenlei());
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -