@@ -0,0 +1,813 @@
+package org.textfiledatatools.core.filter;%0A%0Aimport org.textfiledatatools.core.Record;%0A%0Aimport java.util.Collection;%0Aimport java.util.Collections;%0Aimport java.util.HashSet;%0Aimport java.util.Objects;%0A%0A/**%0A * @author Mathias Kalb%0A * @since 0.1%0A */%0Apublic class CategoriesFilter implements RecordFilter%3CRecord%3E %7B%0A%0A    protected final Collection%3CString%3E categories;%0A    protected final String orElseCategory;%0A%0A    public CategoriesFilter(Collection%3CString%3E categories, String orElseCategory) %7B%0A        Objects.requireNonNull(categories);%0A        this.categories = Collections.synchronizedSet(new HashSet%3C%3E(categories));%0A        this.orElseCategory = orElseCategory;%0A    %7D%0A%0A    @Override%0A    public boolean isValid(Record record) %7B%0A        return categories.contains(record.getCategoryOrElse(orElseCategory));%0A    %7D%0A%0A%7D%0A

Add CategoriesFilter