Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter interface should declare negate(), and() and or(). #18

Closed
rolfl opened this issue Aug 17, 2011 · 1 comment
Closed

Filter interface should declare negate(), and() and or(). #18

rolfl opened this issue Aug 17, 2011 · 1 comment
Milestone

Comments

@rolfl
Copy link
Collaborator

rolfl commented Aug 17, 2011

Currently the and(), negate() and or() methods are defined on the AbstractFilter class only. Since these methods are not on the Filter interface, it makes it hard to access them. The not-so-obvious example of an issue is that it is not possible to do things like build a Filter that selects all elements except those with the name 'notthis' and 'notme'. It would be logical to have the structure:

ElementFilter notme = new ElementFilter("notme");
ElementFilter notthis = new ElementFilter("notthis");

Filter orfilter = notme.or(notthis);
Filter neitherfilter = orfilter.negate();
@rolfl
Copy link
Collaborator Author

rolfl commented Oct 3, 2011

fixed by commit 3217942

@rolfl rolfl closed this as completed Oct 3, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant