Example usage for org.apache.commons.functor UnaryProcedure UnaryProcedure

List of usage examples for org.apache.commons.functor UnaryProcedure UnaryProcedure

Introduction

In this page you can find the example usage for org.apache.commons.functor UnaryProcedure UnaryProcedure.

Prototype

UnaryProcedure

Source Link

Usage

From source file:org.mili.core.io.DefaultFileWalkerTest.java

@Test
public void shouldWalk() {
    final List<File> list = new ArrayList<File>();
    this.walker.walk(new UnaryProcedure<File>() {
        @Override//from www .  j av  a 2s  . co m
        public void run(File file) {
            list.add(file);
        }
    });
    assertEquals(2, list.size());
    assertTrue(list.contains(FILE_1));
    assertTrue(list.contains(FILE_2));
}