|go ahead... be a heretic|
Re^4: Filter objects?by adrianh (Chancellor)
|on Jan 30, 2003 at 17:26 UTC||Need Help??|
I think it was just dragonchild mis-remembering the name of the design pattern - what you're after isn't a facade.
Filters/Pipelines are such a common idiom I have to believe that somebody has documented it as a design pattern somewhere... possibly in a PLoP proceeding. However, I don't have an academic library available to check :-)
I think there's a little confusion because the terms "filtering" and "pipelining" are more often used for applying a series of transformations to something - rather than a series of predicates that exclude objects. From your post I think you're after the latter.
A more concrete example of what you, in particular, are attempting would help. As somebody else already pointed out grep does what you want in simple cases.
If you need to build objects that can apply specific filters, something like this:
allows you to do:
If you need more - you'll have to give up a bit more detail ;-)