本文整理了Java中org.mozilla.zest.core.v1.ZestExpressionOr.getChild()
方法的一些代码示例,展示了ZestExpressionOr.getChild()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZestExpressionOr.getChild()
方法的具体详情如下:
包路径:org.mozilla.zest.core.v1.ZestExpressionOr
类名称:ZestExpressionOr
方法名:getChild
暂无
代码示例来源:origin: mozilla/zest
@Override
public String toString() {
if (this.getChildrenCondition() == null || this.getChildrenCondition().isEmpty()) {
return "Empty OR";
}
StringBuilder expression = new StringBuilder(150);
if (isInverse()) {
expression.append("NOT ");
}
expression.append('(');
int i = 0;
for (; i < this.getChildrenCondition().size() - 1; i++) {
expression.append(this.getChild(i).toString()).append(" OR ");
}
expression.append(this.getChild(i).toString()).append(')');
return expression.toString();
}
}
代码示例来源:origin: mozilla/zest
@Test
public void testOrDeepCopySingleAndSameChildrenClasses() {
List<ZestExpressionElement> children = new LinkedList<>();
for (int i = 0; i < 10; i++) {
children.add(new ZestExpressionLength());
}
ZestExpressionOr or = new ZestExpressionOr(children);
ZestExpressionOr copy = or.deepCopy();
for (int i = 0; i < children.size(); i++) {
assertTrue(or.getChild(i).getClass() == copy.getChild(i).getClass());
}
}
代码示例来源:origin: mozilla/zest
lastChildPrinted < orElement.getChildrenCondition().size() - 1;
lastChildPrinted++) {
printExpression(orElement.getChild(lastChildPrinted), indent + 1);
System.out.print(" || ");
printExpression(orElement.getChild(lastChildPrinted), indent + 1);
内容来源于网络,如有侵权,请联系作者删除!