inner implementations of Filter and Comparator should be static