if (str4.equals(nameht)) {
if (str5.equals("大于")) { if (Integer.parseInt(valueht) > Integer.parseInt(str6)) {
boola = true;
}
else {
boola = false;
}
}
else if (str5.equals("小于")) {
if (Integer.parseInt(valueht) <= Integer.parseInt(str6)) {
boola = true;
}
else {
boola = false;
}
}
else if (str5.equals("等于")) { //等于时候跳转到 166
if (valueht.equals(str6)) {
boola = true;
}
else {
boola = false; //false
}
}
}
}
System.out.println("\n boolb: "+boolb);
str7 = ""; //括号内循环结束后将逻辑操作符str7归零 str9 = tempx.substring(index51 + 1); //放置查找不到逻辑操作符时的字符串 index6 = tempx.indexOf('#', index41 + 1); //logic operation inside
if (index6 > -1) {
index61 = tempx.indexOf('#', index6 + 1);
str7 = tempx.substring(index6 + 1, index61); //str7为括号内部的逻辑操作符
System.out.println(str7); str8 = tempx.substring(index61 + 1, s.indexOf(')'));
System.out.println("str8: " + str8);
tempx = str8;
}
else {
tempx = str9;
System.out.println(str9);
}
System.out.println(tempx);
}
}
temp1 = s.substring(0, 1);
if (temp1.equals("(")) {
index12 = s.indexOf(")");
if (index12 < (s.length() - 1)) {
str1 = s.substring(1, index12);
System.out.println("str1: " + str1);
str2 = s.substring(index12 + 1, s.length());
System.out.println("str2: " + str2);
index2 = str2.indexOf('#'); //取逻辑操作符
System.out.println("boolo 204: " + boolo);
if (index2 != 1) { index21 = str2.indexOf('#', index2 + 1);
str3 = str2.substring(index2 + 1, index21);
System.out.println("str3: " + str3); if (str3.equals("或者")) {
boolo = boolo || boolb;
System.out.println("boolb 213或者: " + boolb);
System.out.println("boolo 214或者: " + boolo);
}
else if (str3.equals("并且")) {
boolo = boolo && boolb;
System.out.println("boolb 218并且: " + boolb);
System.out.println("boolo 219并且: " + boolo);
}
else if (str3.equals("")) {
boolo = boolb;
System.out.println("boolbx: " + boolb);
System.out.println("boolox: " + boolo);
}
System.out.print(boolo); str2 = str2.substring(index21 + 1, str2.length());
System.out.println("str4: " + str2); }
System.out.println("boolo232: "+boolo);
s = str2;
}
else { break;
} } } System.out.println("boola 244: "+boola);
System.out.println("boolb 245: "+boolb);
System.out.println("boolo 246: "+boolo);
return boolo;
}
public static void main(String[] args) {
Hashtable ht = new Hashtable();
ArrayList list = new ArrayList();
ht.put("Name", "出差类别2");
ht.put("Value", "紧急出差b");
list.add(ht);
StringFormatBean sf = new StringFormatBean();
String str1 = "(@天数@#大于#:10:#或者#@出差类别@#等于#:紧急出差:)#并且#@金额@#小于#:10000:";
String str2 = "(@天数1@#大于#:5:#或者#@出差类别2@#等于#:紧急出差:)#并且#(@金额3@#小于#:10000:#或者#@出差类别4@#等于#:紧急出差:)#并且#(@金额5@#小于#:10000:#或者#@出差类别6@#等于#:紧急出差:)";
String str3 = "@天数@#大于#:10:#或者#@出差类别@#等于#:紧急出差:";
System.out.println(sf.StringFormat(str2, list));
}
if (str5.equals("大于")) { if (Integer.parseInt(valueht) > Integer.parseInt(str6)) {
boola = true;
}
else {
boola = false;
}
}
else if (str5.equals("小于")) {
if (Integer.parseInt(valueht) <= Integer.parseInt(str6)) {
boola = true;
}
else {
boola = false;
}
}
else if (str5.equals("等于")) { //等于时候跳转到 166
if (valueht.equals(str6)) {
boola = true;
}
else {
boola = false; //false
}
}
}
}
System.out.println("\n boolb: "+boolb);
str7 = ""; //括号内循环结束后将逻辑操作符str7归零 str9 = tempx.substring(index51 + 1); //放置查找不到逻辑操作符时的字符串 index6 = tempx.indexOf('#', index41 + 1); //logic operation inside
if (index6 > -1) {
index61 = tempx.indexOf('#', index6 + 1);
str7 = tempx.substring(index6 + 1, index61); //str7为括号内部的逻辑操作符
System.out.println(str7); str8 = tempx.substring(index61 + 1, s.indexOf(')'));
System.out.println("str8: " + str8);
tempx = str8;
}
else {
tempx = str9;
System.out.println(str9);
}
System.out.println(tempx);
}
}
temp1 = s.substring(0, 1);
if (temp1.equals("(")) {
index12 = s.indexOf(")");
if (index12 < (s.length() - 1)) {
str1 = s.substring(1, index12);
System.out.println("str1: " + str1);
str2 = s.substring(index12 + 1, s.length());
System.out.println("str2: " + str2);
index2 = str2.indexOf('#'); //取逻辑操作符
System.out.println("boolo 204: " + boolo);
if (index2 != 1) { index21 = str2.indexOf('#', index2 + 1);
str3 = str2.substring(index2 + 1, index21);
System.out.println("str3: " + str3); if (str3.equals("或者")) {
boolo = boolo || boolb;
System.out.println("boolb 213或者: " + boolb);
System.out.println("boolo 214或者: " + boolo);
}
else if (str3.equals("并且")) {
boolo = boolo && boolb;
System.out.println("boolb 218并且: " + boolb);
System.out.println("boolo 219并且: " + boolo);
}
else if (str3.equals("")) {
boolo = boolb;
System.out.println("boolbx: " + boolb);
System.out.println("boolox: " + boolo);
}
System.out.print(boolo); str2 = str2.substring(index21 + 1, str2.length());
System.out.println("str4: " + str2); }
System.out.println("boolo232: "+boolo);
s = str2;
}
else { break;
} } } System.out.println("boola 244: "+boola);
System.out.println("boolb 245: "+boolb);
System.out.println("boolo 246: "+boolo);
return boolo;
}
public static void main(String[] args) {
Hashtable ht = new Hashtable();
ArrayList list = new ArrayList();
ht.put("Name", "出差类别2");
ht.put("Value", "紧急出差b");
list.add(ht);
StringFormatBean sf = new StringFormatBean();
String str1 = "(@天数@#大于#:10:#或者#@出差类别@#等于#:紧急出差:)#并且#@金额@#小于#:10000:";
String str2 = "(@天数1@#大于#:5:#或者#@出差类别2@#等于#:紧急出差:)#并且#(@金额3@#小于#:10000:#或者#@出差类别4@#等于#:紧急出差:)#并且#(@金额5@#小于#:10000:#或者#@出差类别6@#等于#:紧急出差:)";
String str3 = "@天数@#大于#:10:#或者#@出差类别@#等于#:紧急出差:";
System.out.println(sf.StringFormat(str2, list));
}
解决方案 »
- 请教下 jsp:plugin 标签 加载javaBean 的问题~~~~~~~~~~~~~~~~~~~~~~
- weblogic12c 错误<BEA-000402>
- eclipse-javaee的版本有没有类似myeclipse的重新布署功能?
- 最近接手一个棘手的项目,如何远程控制防火墙或VPN的开关
- 如何用jaxb生成空的标签
- JDBC 急!!
- 600分!JMS选型,请教ActiveMQ的问题!
- 用J2EE编什么?举个例子
- 『打包问题,关于jar文件』
- ###散分问路,请问那里有JBuilder + Weblogic + Oracle 开发实例的电子书下载?###
- 各位,请帮忙啊,急!急!急!急!急!(Struts 连接数据库配置server.xml的问题)郁闷好几天了,如过能帮助,我把分都给他!
- 新手请教:Session Bean调用数据库的错误。100分鸣谢!
小于 包括 小于等于
[email protected]
谢谢