commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Radford Tam (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (COLLECTIONS-356) Request for a Many-to-Many BidiMap
Date Fri, 22 Nov 2013 17:58:39 GMT

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

Radford Tam commented on COLLECTIONS-356:
-----------------------------------------

Note that according to the documentation in BidiMap, it is supposed to enforce a 1:1 relationship
between keys and values.
http://commons.apache.org/proper/commons-collections/javadocs/api-release/org/apache/commons/collections4/BidiMap.html

Obviously there isn't really anything to prevent a many-to-many implementation, but should
a many-to-many BidiMap even implement the BidiMap interface?



> Request for a Many-to-Many BidiMap
> ----------------------------------
>
>                 Key: COLLECTIONS-356
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-356
>             Project: Commons Collections
>          Issue Type: New Feature
>          Components: Collection
>            Reporter: Franz Wong
>            Priority: Minor
>             Fix For: 4.x
>
>
> Currently, BidiMap supports one to one relationship. However, in real life, there are
many many-to-many relationships. Take an example of student and course. One student can take
many courses while one course contain many students. It would be useful to have a class to
manipulate such situation.
> The work around currently is using 2 hash maps.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message