Skip to content

Instantly share code, notes, and snippets.

@sjyun
Created November 10, 2018 07:55
Show Gist options
  • Save sjyun/e5b0c98e474e42936ec2eb409b0fadc7 to your computer and use it in GitHub Desktop.
Save sjyun/e5b0c98e474e42936ec2eb409b0fadc7 to your computer and use it in GitHub Desktop.
predicate
List<T> aa;
List<T> filterAa(List<T> arr, aaPredicate p){
for(){
if(p.test(aa)){
result.add(app);
}
}
}
@sjyun
Copy link
Author

sjyun commented Nov 10, 2018

public static List globalFilter(List list, Predicate p){
List result = new ArrayList<>();
for(T e: list){
if(p.test(e)){
result.add(e);
}
}
return result;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment