What methods should go into a java.util.Objects class in JDK 7?
Joseph D. Darcy
Joe.Darcy at Sun.COM
Wed Oct 7 17:25:48 UTC 2009
David Holmes - Sun Microsystems wrote:
> Stephen Colebourne said the following on 10/07/09 18:10:
>> BTW, I don't accept the argument that one and only one way to do
>> something is part of the JDK.
> While the JDK is far from a model example of providing "one way" to do
> something, that doesn't mean we should gratuitously add superfluous
> and redundant functionality.
The JDK has a long history of providing convenience methods. For
example, we have PrintStream.format and PrintStream.printf which are
just two names for the same functionality.
> Type.valueOf is an established pattern for converting types.
> The JDK is already severely bloated - new APIs should pay their own way.
Getting rid of more than half a dozen implementations of equals(Object,
Object) should just in the JDK should more than pay the for the entire
Objects class ;-)
More information about the core-libs-dev