Example usage for org.apache.commons.collections.functors AndPredicate getPredicates

List of usage examples for org.apache.commons.collections.functors AndPredicate getPredicates

Introduction

In this page you can find the example usage for org.apache.commons.collections.functors AndPredicate getPredicates.

Prototype

public Predicate[] getPredicates() 

Source Link

Document

Gets the two predicates being decorated as an array.

Usage

From source file:org.springmodules.validation.valang.javascript.ValangJavaScriptTranslator.java

void visit(AndPredicate p) throws IOException {
    String op = ") && ";
    for (int i = 0; i < p.getPredicates().length; i++) {
        Predicate innerP = p.getPredicates()[i];
        append('(');
        doVisit(innerP);//  w w  w  .  j  a v  a  2s. c  o m
        if (i < p.getPredicates().length - 1) {
            append(op);
        } else {
            append(')');
        }
    }
}