All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.cj.jshintmojo.jshint.FunctionalJava Maven / Gradle / Ivy

There is a newer version: 1.6.0
Show newest version
package com.cj.jshintmojo.jshint;

import java.util.ArrayList;
import java.util.List;

public class FunctionalJava {
	public interface Fn{
		Return apply(Input i);
	}
	public static  List filter(List items, Fn fn){
		List matches = new ArrayList(items.size());

		for(T next : items){
			if(fn.apply(next)){
				matches.add(next);
			}
		}

		return matches;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy