Skip to content

Instantly share code, notes, and snippets.

@SG-K

SG-K/gist5.java Secret

Created Jul 22, 2020
Embed
What would you like to do?
public class FilterManager {
public ArrayList<Item> applyFilters(ArrayList<Item> arrayList, Filterable ... filters){
ArrayList<Item> filteredList = new ArrayList<>(arrayList);
for (Filterable f: filters) {
filteredList = f.applyFilter(filteredList);
}
return filteredList;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment