com.cj.jshintmojo.jshint.FunctionalJava Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jshint-maven-plugin Show documentation
Show all versions of jshint-maven-plugin Show documentation
a maven mojo that integrates the 'jshint' javascript preprocessor
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;
}
}