Skip to content

Instantly share code, notes, and snippets.


SG-K/ Secret

Created Jul 22, 2020
What would you like to do?
public class GenreFilter extends Filter<Integer> implements Filterable {
public ArrayList<Item> applyFilter(ArrayList<Item> arrayList) {
if (value == null) {
return arrayList;
} else {
ArrayList<Item> newArrayList = new ArrayList<>();
for (int i = 0; i < arrayList.size(); i++) {
int tmp = arrayList.get(i).getGenreID();
if (tmp == value)
return newArrayList;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment