关于不定条件写法的问题

大家好:
现在有个问题,麻烦大家帮解答下。假设说有个集合。我现在要过滤这个集合,条件数目是不定的,装在一个数组里面。我现在要怎么写这个if语句呢
[code="java"]
for(int l=0;l<conditionArray.length;l++){
String condition= conditionArray.get(l);
if(condition==xxxx) {

return true;

}

return false;

}
[/code]
这样写肯定不行 只能限制一个条件,我现在想吧数组里面的条件都限制了 用&&连接,请问怎么写。我试过写成字符串连接起来的方式然后强转成BOOLEAN.不过行不通。一定要递归么?

建议你使用一个借口,比如
[code="java"]
public interface ICheck{
public boolean check();
}[/code]
每个查询条件如何判断你应该都知道,然后调用

[code="java"]
boolean result = false;
for(int l=0;l<conditionArray.length;l++){
result = result && conditionArray.check();
}
return result;[/code]