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

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

Introduction

In this page you can find the example usage for org.apache.commons.collections.functors OrPredicate 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(OrPredicate p) throws IOException {
    String op = ") || ";
    for (int i = 0; i < p.getPredicates().length; i++) {
        Predicate innerP = p.getPredicates()[i];
        append('(');
        doVisit(innerP);//w  ww  .  ja va 2 s  .  c  o m
        if (i < p.getPredicates().length - 1) {
            append(op);
        } else {
            append(')');
        }
    }
}