commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gilles (JIRA)" <>
Subject [jira] Commented: (MATH-432) Create a "Pair" class
Date Fri, 05 Nov 2010 21:12:43 GMT


Gilles commented on MATH-432:

Since we don't make _copies_ of the key and value passed to the constructor, the references
are shared by the arguments and the instances variables of the newly-created {{Pair}}. Assuming
that the object is immutable (and documenting it as such) may thus give a false sense of safety.
Is changing the code still worth it?

> Create a "Pair" class
> ---------------------
>                 Key: MATH-432
>                 URL:
>             Project: Commons Math
>          Issue Type: New Feature
>            Reporter: Gilles
>            Assignee: Gilles
>             Fix For: 3.0
> The {{AbstractMap.SimpleEntry}} implementation of {{Map.Entry<K,V>}} is only available
in Java 1.6+.
> I propose to create a class Pair<K,V> to be used as a replacement.

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

View raw message