You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Henri Yandell (JIRA)" <ji...@apache.org> on 2007/05/16 16:23:16 UTC
[jira] Commented: (IO-119) Convenience "Builder" for creating
complex FileFilter conditions
[ https://issues.apache.org/jira/browse/IO-119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12496310 ]
Henri Yandell commented on IO-119:
----------------------------------
Just looking at the API from a user point of view:
end() is a bit weird. Reminds me of the JODA JSR's resolve() :)
orBuilder() seems a bit odd. Why not or()? orBuilder() is different to or()?
---
I'm sure there are good reasons, will look at the code to grok more.
> Convenience "Builder" for creating complex FileFilter conditions
> ----------------------------------------------------------------
>
> Key: IO-119
> URL: https://issues.apache.org/jira/browse/IO-119
> Project: Commons IO
> Issue Type: Improvement
> Components: Filters
> Affects Versions: 1.3.1
> Reporter: Niall Pemberton
> Assigned To: Niall Pemberton
> Priority: Minor
> Fix For: 1.4
>
> Attachments: FileFilterBuilder.java, FileFilterBuilderTestCase.java
>
>
> I'd like to add a new convenience "builder" class (FileFilterBuilder) to make it easier to create complex FileFilter using Commons IO's IOFileFilter implementations.
> Heres an example of how it can be used to create a IOFileFilter for the following conditions:
> - Either, directories which are not hidden and not named ".svn"
> - or, files which have a suffix of ".java"
> IOFileFilter filter = FileFilterBuilder.orBuilder()
> .and().isDirectory().isHidden(false).not().name(".svn").end()
> .and().isFile().suffix(".java").end()
> .getFileFilter();
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org