You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Michael Wooten (JIRA)" <ji...@apache.org> on 2009/03/15 16:42:50 UTC
[jira] Created: (IO-198) Add ability in FileFilterUtils to apply
file filters to collections and maps
Add ability in FileFilterUtils to apply file filters to collections and maps
----------------------------------------------------------------------------
Key: IO-198
URL: https://issues.apache.org/jira/browse/IO-198
Project: Commons IO
Issue Type: New Feature
Components: Filters
Affects Versions: 2.0
Environment: All
Reporter: Michael Wooten
Priority: Minor
Fix For: 2.0
Add features to FileFilterUtils that allow for filtering collections and maps of files that are not retrieved from directories in the standard manner. This feature could be useful for filtering files that are provided by the user or that do not all reside in the same directory.
Example:
List<File> files = getUserSelectedFiles();
List<File> xmlFiles = FileFilterUtils.filterList(Arrays.<File>asList(new File("A.txt"), new File("B.xml")), FileFilterUtils.suffixFileFilter(".xml"));
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (IO-198) Add ability in FileFilterUtils to apply
file filters to collections and maps
Posted by "Michael Wooten (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/IO-198?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Wooten updated IO-198:
------------------------------
Fix Version/s: (was: 2.0)
2.x
Affects Version/s: (was: 2.0)
2.x
> Add ability in FileFilterUtils to apply file filters to collections and maps
> ----------------------------------------------------------------------------
>
> Key: IO-198
> URL: https://issues.apache.org/jira/browse/IO-198
> Project: Commons IO
> Issue Type: New Feature
> Components: Filters
> Affects Versions: 2.x
> Environment: All
> Reporter: Michael Wooten
> Priority: Minor
> Fix For: 2.x
>
> Attachments: commons-io-filefilters.patch
>
> Original Estimate: 8h
> Remaining Estimate: 8h
>
> Add features to FileFilterUtils that allow for filtering collections and maps of files that are not retrieved from directories in the standard manner. This feature could be useful for filtering files that are provided by the user or that do not all reside in the same directory.
> Example:
> List<File> files = getUserSelectedFiles();
> List<File> xmlFiles = FileFilterUtils.filterList(Arrays.<File>asList(new File("A.txt"), new File("B.xml")), FileFilterUtils.suffixFileFilter(".xml"));
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (IO-198) Add ability in FileFilterUtils to apply
file filters to collections and maps
Posted by "Michael Wooten (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/IO-198?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Wooten updated IO-198:
------------------------------
Affects Version/s: (was: 2.x)
2.0
> Add ability in FileFilterUtils to apply file filters to collections and maps
> ----------------------------------------------------------------------------
>
> Key: IO-198
> URL: https://issues.apache.org/jira/browse/IO-198
> Project: Commons IO
> Issue Type: New Feature
> Components: Filters
> Affects Versions: 2.0
> Environment: All
> Reporter: Michael Wooten
> Priority: Minor
> Fix For: 2.0
>
> Attachments: commons-io-filefilters.patch
>
> Original Estimate: 8h
> Remaining Estimate: 8h
>
> Add features to FileFilterUtils that allow for filtering collections and maps of files that are not retrieved from directories in the standard manner. This feature could be useful for filtering files that are provided by the user or that do not all reside in the same directory.
> Example:
> List<File> files = getUserSelectedFiles();
> List<File> xmlFiles = FileFilterUtils.filterList(Arrays.<File>asList(new File("A.txt"), new File("B.xml")), FileFilterUtils.suffixFileFilter(".xml"));
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (IO-198) Add ability in
FileFilterUtils to apply file filters to collections and arrays
Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/IO-198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12916002#action_12916002 ]
Niall Pemberton edited comment on IO-198 at 9/28/10 11:28 PM:
--------------------------------------------------------------
Thanks for the patch - I made some changes before I applied it.
The Map filtering seemed a bit odd to me - so I dropped that part of the patch. I also changed the method signatures and added some additional ones, including support for arrays:
filter() methods that return an array of Files:
{code}
public static File[] filter(IOFileFilter filter, File... files) {
public static File[] filter(IOFileFilter filter, Iterable<File> files) {
{code}
filterList() methods that return a List of Files:
{code}
public static List<File> filterList(IOFileFilter filter, Iterable<File> files) {
public static List<File> filterList(IOFileFilter filter, File... files) {
{code}
filterSet() methods that return a Set of Files:
{code}
public static Set<File> filterSet(IOFileFilter filter, File... files) {
public static Set<File> filterSet(IOFileFilter filter, Iterable<File> files) {
{code}
was (Author: niallp):
Thanks for the patch - I made some changes before I applied it.
The Map filtering seemed a bit odd to me - so I dropped that part of the patch. I also changed the method signatures and added some additional ones, including support for arrays:
{code}
public static File[] filter(IOFileFilter filter, File... files) {
public static File[] filter(IOFileFilter filter, Iterable<File> files) {
public static List<File> filterList(IOFileFilter filter, Iterable<File> files) {
public static List<File> filterList(IOFileFilter filter, File... files) {
public static Set<File> filterSet(IOFileFilter filter, File... files) {
public static Set<File> filterSet(IOFileFilter filter, Iterable<File> files) {
{code}
> Add ability in FileFilterUtils to apply file filters to collections and arrays
> ------------------------------------------------------------------------------
>
> Key: IO-198
> URL: https://issues.apache.org/jira/browse/IO-198
> Project: Commons IO
> Issue Type: New Feature
> Components: Filters
> Affects Versions: 1.4
> Environment: All
> Reporter: Michael Wooten
> Assignee: Niall Pemberton
> Priority: Minor
> Fix For: 2.0
>
> Attachments: commons-io-filefilters.patch
>
> Original Estimate: 8h
> Remaining Estimate: 8h
>
> Add features to FileFilterUtils that allow for filtering collections and maps of files that are not retrieved from directories in the standard manner. This feature could be useful for filtering files that are provided by the user or that do not all reside in the same directory.
> Example:
> List<File> files = getUserSelectedFiles();
> List<File> xmlFiles = FileFilterUtils.filterList(Arrays.<File>asList(new File("A.txt"), new File("B.xml")), FileFilterUtils.suffixFileFilter(".xml"));
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (IO-198) Add ability in FileFilterUtils to apply
file filters to collections and arrays
Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/IO-198?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Niall Pemberton updated IO-198:
-------------------------------
Summary: Add ability in FileFilterUtils to apply file filters to collections and arrays (was: Add ability in FileFilterUtils to apply file filters to collections and maps)
Assignee: Niall Pemberton
Affects Version/s: 1.4
(was: 2.0)
> Add ability in FileFilterUtils to apply file filters to collections and arrays
> ------------------------------------------------------------------------------
>
> Key: IO-198
> URL: https://issues.apache.org/jira/browse/IO-198
> Project: Commons IO
> Issue Type: New Feature
> Components: Filters
> Affects Versions: 1.4
> Environment: All
> Reporter: Michael Wooten
> Assignee: Niall Pemberton
> Priority: Minor
> Fix For: 2.0
>
> Attachments: commons-io-filefilters.patch
>
> Original Estimate: 8h
> Remaining Estimate: 8h
>
> Add features to FileFilterUtils that allow for filtering collections and maps of files that are not retrieved from directories in the standard manner. This feature could be useful for filtering files that are provided by the user or that do not all reside in the same directory.
> Example:
> List<File> files = getUserSelectedFiles();
> List<File> xmlFiles = FileFilterUtils.filterList(Arrays.<File>asList(new File("A.txt"), new File("B.xml")), FileFilterUtils.suffixFileFilter(".xml"));
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (IO-198) Add ability in FileFilterUtils to apply
file filters to collections and maps
Posted by "Michael Wooten (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/IO-198?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Wooten updated IO-198:
------------------------------
Fix Version/s: (was: 2.x)
2.0
> Add ability in FileFilterUtils to apply file filters to collections and maps
> ----------------------------------------------------------------------------
>
> Key: IO-198
> URL: https://issues.apache.org/jira/browse/IO-198
> Project: Commons IO
> Issue Type: New Feature
> Components: Filters
> Affects Versions: 2.0
> Environment: All
> Reporter: Michael Wooten
> Priority: Minor
> Fix For: 2.0
>
> Attachments: commons-io-filefilters.patch
>
> Original Estimate: 8h
> Remaining Estimate: 8h
>
> Add features to FileFilterUtils that allow for filtering collections and maps of files that are not retrieved from directories in the standard manner. This feature could be useful for filtering files that are provided by the user or that do not all reside in the same directory.
> Example:
> List<File> files = getUserSelectedFiles();
> List<File> xmlFiles = FileFilterUtils.filterList(Arrays.<File>asList(new File("A.txt"), new File("B.xml")), FileFilterUtils.suffixFileFilter(".xml"));
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (IO-198) Add ability in FileFilterUtils to apply
file filters to collections and arrays
Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/IO-198?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Niall Pemberton resolved IO-198.
--------------------------------
Resolution: Fixed
Thanks for the patch - I made some changes before I applied it.
The Map filtering seemed a bit odd to me - so I dropped that part of the patch. I also changed the method signatures and added some additional ones, including support for arrays:
{code}
public static File[] filter(IOFileFilter filter, File... files) {
public static File[] filter(IOFileFilter filter, Iterable<File> files) {
public static List<File> filterList(IOFileFilter filter, Iterable<File> files) {
public static List<File> filterList(IOFileFilter filter, File... files) {
public static Set<File> filterSet(IOFileFilter filter, File... files) {
public static Set<File> filterSet(IOFileFilter filter, Iterable<File> files) {
{code}
> Add ability in FileFilterUtils to apply file filters to collections and arrays
> ------------------------------------------------------------------------------
>
> Key: IO-198
> URL: https://issues.apache.org/jira/browse/IO-198
> Project: Commons IO
> Issue Type: New Feature
> Components: Filters
> Affects Versions: 1.4
> Environment: All
> Reporter: Michael Wooten
> Assignee: Niall Pemberton
> Priority: Minor
> Fix For: 2.0
>
> Attachments: commons-io-filefilters.patch
>
> Original Estimate: 8h
> Remaining Estimate: 8h
>
> Add features to FileFilterUtils that allow for filtering collections and maps of files that are not retrieved from directories in the standard manner. This feature could be useful for filtering files that are provided by the user or that do not all reside in the same directory.
> Example:
> List<File> files = getUserSelectedFiles();
> List<File> xmlFiles = FileFilterUtils.filterList(Arrays.<File>asList(new File("A.txt"), new File("B.xml")), FileFilterUtils.suffixFileFilter(".xml"));
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (IO-198) Add ability in FileFilterUtils to apply
file filters to collections and maps
Posted by "Michael Wooten (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/IO-198?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Wooten updated IO-198:
------------------------------
Attachment: commons-io-filefilters.patch
A patch containing the updates to FileFilterUtils and respective test cases in FileFilterTestCase. The patch was generated using the SVN diff tool in Eclipse. The patch adds the following methods to FileFilterUtils:
public static List<File> filterList(List<File> fileList, IOFileFilter fileFilter);
public static Set<File> filterSet(Set<File> fileSet, IOFileFilter fileFilter);
public static <T> Map<File, T> filterMap(Map<File, T> fileMap, IOFileFilter fileFilter);
> Add ability in FileFilterUtils to apply file filters to collections and maps
> ----------------------------------------------------------------------------
>
> Key: IO-198
> URL: https://issues.apache.org/jira/browse/IO-198
> Project: Commons IO
> Issue Type: New Feature
> Components: Filters
> Affects Versions: 2.0
> Environment: All
> Reporter: Michael Wooten
> Priority: Minor
> Fix For: 2.0
>
> Attachments: commons-io-filefilters.patch
>
> Original Estimate: 8h
> Remaining Estimate: 8h
>
> Add features to FileFilterUtils that allow for filtering collections and maps of files that are not retrieved from directories in the standard manner. This feature could be useful for filtering files that are provided by the user or that do not all reside in the same directory.
> Example:
> List<File> files = getUserSelectedFiles();
> List<File> xmlFiles = FileFilterUtils.filterList(Arrays.<File>asList(new File("A.txt"), new File("B.xml")), FileFilterUtils.suffixFileFilter(".xml"));
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.