[ 
https://issues.apache.org/jira/browse/IO-145?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12549260
 ] 

Niall Pemberton commented on IO-145:
------------------------------------

I would agree with you both except that the implementations I attached include 
singletons for both "normal" and reverse options - so for example the requested 
features from IO-142 which prompted this:

For last modified order:
    Collections.sort(list, LastModifiedFileComparator.LASTMODIFIED_COMPARATOR);

For reverse last modified order:
    Collections.sort(list, LastModifiedFileComparator.LASTMODIFIED_REVERSE);

For file name order:
    Collections.sort(list, NameFileComparator.NAME_COMPARATOR);

For reverse file name order:
    Collections.sort(list, NameFileComparator.NAME_REVERSE));

Obviously I could remove the reverse options (and implementation) - but this 
seems useful?

> File Comparator implementations
> -------------------------------
>
>                 Key: IO-145
>                 URL: https://issues.apache.org/jira/browse/IO-145
>             Project: Commons IO
>          Issue Type: New Feature
>    Affects Versions: 1.3.2
>            Reporter: Niall Pemberton
>            Assignee: Niall Pemberton
>            Priority: Minor
>             Fix For: AFTER-1.4
>
>         Attachments: DefaultFileComparator.java, 
> LastModifiedFileComparator.java, LengthFileComparator.java, 
> NameFileComparator.java, PathFileComparator.java, ReverseFileComparator.java, 
> SuffixFileComparator.java
>
>
> Add file comparator implementations - prompted by IO-142

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to