[jira] Commented: (IO-145) File Comparator implementations
[ https://issues.apache.org/jira/browse/IO-145?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12549369 ] Stephen Colebourne commented on IO-145: --- I support the addition of these as a new subpackage of [io]. I also support the provision of 'REVERSE' constants, however I would prefer to see any reverse implementation as package scoped. The JDK supplies the implementation itself as from Java 5 (on Collections). This code is also Java 5 specific. If it is to go in the 1.x branch of [io] then the generics need removing. Personally, I think it might be worth just applying the classes to the new java 5 project/branch. > 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, > ExtensionFileComparator.java, LastModifiedFileComparator.java, > LengthFileComparator.java, NameFileComparator.java, PathFileComparator.java, > ReverseFileComparator.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.
[jira] Commented: (IO-145) File Comparator implementations
[ 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.
[jira] Commented: (IO-145) File Comparator implementations
[ https://issues.apache.org/jira/browse/IO-145?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12549184 ] Stephen Kestle commented on IO-145: --- Yeah, I could go either way on that. There's not necessarily a "need" to have a ReverseFileComparator at all (hence no dependency on collections), but it's probably useful for completeness. I'd put a note about the availability of the general ReverseComparator in collections in the javadoc. Also note that collections is quite likely to shrink, and revive the commons-functors package. > 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.
[jira] Commented: (IO-145) File Comparator implementations
[ https://issues.apache.org/jira/browse/IO-145?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12549171 ] Matt Benson commented on IO-145: Agreed that "dependency free" is an aim for all Commons components, but in this case the API depends on an interface available from the base JDK. This seems to me different as the user doesn't have to use [collections] unless he needs a comparator that lives there. I'll leave my argument at that, however, since I'm not highly offended. > 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.
[jira] Commented: (IO-145) File Comparator implementations
[ https://issues.apache.org/jira/browse/IO-145?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12549157 ] Matt Benson commented on IO-145: Again, I don't really buy the overlap of [io] having its own reverse comparator implementation, especially depending on what [collections] does with generics, that being the only difference here. Consider also that if you provide ReverseFileComparator you'll either have to have a NaturalFileComparator to reverse in case you want to reverse File's natural order, or allow ReverseFileComparator with no delegate to indicate reverse natural ordering. > 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: 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.
[jira] Commented: (IO-145) File Comparator implementations
[ https://issues.apache.org/jira/browse/IO-145?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12549133 ] Gary Gregory commented on IO-145: - Nit: LastmodifiedFileComparator should be LastModifiedFileComparator > 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: 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.