Example usage for org.apache.commons.collections ClosureUtils nopClosure

List of usage examples for org.apache.commons.collections ClosureUtils nopClosure

Introduction

In this page you can find the example usage for org.apache.commons.collections ClosureUtils nopClosure.

Prototype

public static Closure nopClosure() 

Source Link

Document

Gets a Closure that will do nothing.

Usage

From source file:ClosureExample.java

public static void main(String args[]) {
    Closure ifClosure = ClosureUtils.ifClosure(PredicateUtils.equalPredicate(new Integer(20)),
            ClosureUtils.nopClosure(), ClosureUtils.exceptionClosure());
    ifClosure.execute(new Integer(20));
    //      ifClosure.execute(new Integer(30));
}