I'm designing a class that takes:
1 - An initial set of items (a simple collection/list)
2 - 1 or more Filter objects, that take the initial set of items and return a new set. Each Filter object may return a different set of items, so the main class performs and intersection of the result of these sets. Some of these Filter objects, however, perform a subset operation based on the resulting set of the intersection of the sets from the other Filters instead of the initial set.
What should I call this class if its main function is to return a new set by performing intersection and subset operations based on a given set and one or more Filter objects?
The -partial- interface for the Filter class looks like this:
constructor(ItemsSet set, options) : ItemsSet getFilteredSet() : ItemsSet
And for the class that I'm designing:
constructor(ItemsSet mainSet, filters) : ItemsSet getSet(): ItemsSet
I was thinking:
I'm leaning towards SubsetOfItems but this class will not always have a filter that performs a subset of the resulting set from the intersection of the other sets. Hopefully that makes sense.
In other words, the operation can be intersection-only, subset-only, intersection AND subset.