1. Micha Kops
  2. functional-java-examples

Commits

Micha Kops  committed 3bb4987

Played around with commons-functor alpha lib.

  • Participants
  • Parent commits 59d05c8
  • Branches default

Comments (0)

Files changed (1)

File src/main/java/com/hascode/tutorial/CommonsFunctorExample.java

View file
 package com.hascode.tutorial;
 
+import org.apache.commons.functor.Predicate;
+import org.apache.commons.functor.Procedure;
+import org.apache.commons.functor.core.algorithm.WhileDo;
 
 public class CommonsFunctorExample {
 	public static void main(final String[] args) {
+		Predicate predicate = new Predicate() {
+			public boolean test() {
+				return true;
+			}
+		};
+		Procedure procedure = new Procedure() {
+			public void run() {
+				System.out.println("test");
+			}
+		};
+		new WhileDo(predicate, procedure).run();
 	}
 }