commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claude Warren (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (COLLECTIONS-439) TreeBag with comparator does not store non-key duplicates.
Date Fri, 08 Feb 2013 08:41:12 GMT

    [ https://issues.apache.org/jira/browse/COLLECTIONS-439?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13574320#comment-13574320
] 

Claude Warren commented on COLLECTIONS-439:
-------------------------------------------

Thomas,

I am a committer on the Jena project and am wondering if the collections project would accept
the submission of our ExtendedIterator?  I will package it, and the test cases as part of
this submission if that is acceptable.

The extended iterator adds 3 basic pieces of functionality.
1. the ability to chain multiple iterators together into a single iterator. (the functionality
that my SortedBag uses)
2. the ability to filter results.
3. the ability to map results to another type. (e.g. map Integer results to Long)

In any case I will be fixing the dependencies one way or another and adding test cases for
resubmission.
                
> TreeBag with comparator does not store non-key duplicates.
> ----------------------------------------------------------
>
>                 Key: COLLECTIONS-439
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-439
>             Project: Commons Collections
>          Issue Type: Improvement
>          Components: Bag
>    Affects Versions: 3.2.1
>            Reporter: Claude Warren
>         Attachments: SortedBag.java
>
>
> When storing objects that are sorted by a Comparator, if the differences in the objects
are not in the comparator the same version of the object is returned.  I expected that the
sorted bag would work like a DB table with a non-unique key -- ordered but duplicate only
determined by Object.equals().
> I have implemented this type of bag using a TreeMap of List.  My implementation uses
the Jena ExtendedIterator to make building the iterator() and array() methods easier.
> Will attach the code.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message