Thanks to all those providing feedback on *OrderedSet*. Based on your comments I've made revisions to the introductory paragraphs in both the README text <https://github.com/dvimont/OrderedSet> and the Javadocs <http://bit.ly/ordered-set>, with an eye toward explaining more effectively up front what differentiates an *OrderedSet *from the standard ordering/sorting options that are available.
On Sun, Apr 10, 2016 at 4:04 PM, Daniel Vimont <dan...@commonvox.org> wrote: > I very much appreciate your feedback on this so far! > > Clearly, one major challenge before me is to provide much better > documentation, and by "better" I mean documentation which explains up front > (within the first couple of sentences) what differentiates the OrderedSet > implementation from other Collection implementations which order or sort > items. > > One obvious analogy that comes to mind (which might be helpful to include > in some appropriate place within Javadocs and/or README text) is that of a > "card catalog". This seems to me a close-to-perfect analogy with one major > caveat: many people under 30 may not know what a card catalog is! > > On Sat, Apr 9, 2016 at 6:45 AM, Daniel Vimont <dan...@commonvox.org> > wrote: > >> Such is the beauty of open-source development -- please do fork away -- I >> would be anxious to see what you come up with! And I will look into OGNL >> (had not heard of it before). >> >> BTW, here is the original desktop application in which I developed the >> progenitor of OrderedSet: https://youtu.be/A1NJD8t9RIU >> >> Thanks! >> >> >> On Fri, Apr 8, 2016 at 11:19 PM, James Carman <ja...@carmanconsulting.com >> > wrote: >> >>> Don't get me wrong. This is a cool idea and I think we can build upon >>> it. >>> But, I think we can "stand on the shoulders of giants" a bit here and use >>> some tools that are already available to us. The use of reflection in >>> your >>> code is a little off-putting. One option to consider would be something >>> like OGNL. >>> >>> On Fri, Apr 8, 2016 at 9:53 AM Daniel Vimont <dan...@commonvox.org> >>> wrote: >>> >>> > Thanks for the suggestion. I will look into emulating OrderedSet >>> > functionality using the two classes you recommend. >>> > >>> > Since all of the materials that I provided may be a bit on the "tl;dr" >>> > side, I will focus on a single example: >>> > >>> > Book class, with the following attribute get-methods: >>> > getAuthors -- returns collection of Author objects (a Book may have >>> > multiple authors) >>> > getGenres -- returns collection of Genre objects (a Book may be >>> > classified in multiple genres) >>> > getTitle -- returns a Title object (a Book has only one title) >>> > >>> > Order these two Books by a Genre|Author|Title composite-key >>> > Book 1: >>> > Title: Dictionary of the English Language >>> > Genres: Nonfiction; Reference >>> > Authors: Merriam, George; Webster, Noah >>> > Book 2: >>> > Title: A Walk in the Woods >>> > Genres: Nonfiction; Travel; Quest >>> > Author: Bryson, Bill >>> > >>> > Following construction and population of an OrderedSet, invocation of >>> the >>> > #entrySet method will return the following entries: >>> > >>> > *Key-components (composite-key) Value* >>> > *========================================== ========* >>> > *Genre Author Title Book* >>> > *------ -------- ------ --------* >>> > *Nonfiction Bryson, Bill A Walk... Book 2* >>> > *Nonfiction Merriam, George Dictionary... Book 1* >>> > *Nonfiction Webster, Noah Dictionary... Book 1* >>> > *Quest Bryson, Bill A Walk... Book 2* >>> > *Reference Merriam, George Dictionary... Book 1* >>> > *Reference Webster, Noah Dictionary... Book 1* >>> > *Travel Bryson, Bill A Walk... Book 2* >>> > >>> > >>> > On Fri, Apr 8, 2016 at 8:19 PM, James Carman < >>> ja...@carmanconsulting.com> >>> > wrote: >>> > >>> > > Couldn't you achieve the same thing using any SortedSet and >>> > > CompareToBuilder? >>> > > On Fri, Apr 8, 2016 at 2:17 AM Daniel Vimont <dan...@commonvox.org> >>> > wrote: >>> > > >>> > > > Hello all, >>> > > > >>> > > > I've just published a new extension to the standard Java >>> Collections >>> > > > Framework to both GitHub and the Maven Central Repository, and am >>> > > > considering offering it up for possible inclusion in the Apache >>> Commons >>> > > > Collections package. >>> > > > >>> > > > The name of the class is "OrderedSet", which is an abbreviated >>> version >>> > of >>> > > > its original working name, "CompositeKeyOrderedSet". As its >>> previous >>> > > > working name suggests, an OrderedSet provides for composite-key >>> based >>> > > > ordering of a set of values (analogous to composite-key ordering >>> in a >>> > > > relational database). To get a better sense of what that actually >>> > means, >>> > > > the README text on the project's GitHub page provides a quick >>> overview >>> > > (or >>> > > > dive down into the source code on the GitHub page, if you prefer): >>> > > > https://github.com/dvimont/OrderedSet >>> > > > >>> > > > For more thorough end-user documentation, the project's Javadocs >>> can be >>> > > > consulted: >>> > > > http://bit.ly/ordered-set >>> > > > >>> > > > I realize that "Apache Commons is a Commit-Then-Review community", >>> but >>> > > > before I go through the steps of preparing a patch for submission I >>> > > wanted >>> > > > to get some feedback, if possible, regarding whether this class >>> would >>> > be >>> > > > appropriate for inclusion in the Apache Commons Collections >>> package, >>> > and >>> > > to >>> > > > be sure that its core functionality does not duplicate either (a) >>> some >>> > > > already-existing component of the package or (b) some alternate, >>> > > well-known >>> > > > (to all but me!) means of achieving automated composite-key-style >>> > > ordering >>> > > > (in Java 1.6+). >>> > > > >>> > > > Thanks very much, >>> > > > >>> > > > Dan Vimont >>> > > > >>> > > >>> > >>> >> >> >