From 6137fbfb7966e266b8be20d030ae0398057199c0 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Fri, 23 Oct 2009 04:58:49 +0000 Subject: [PATCH] As Charlie points out, we can use the protected constructor if we're creating an anonymous extension of DefaultMap and any other creation is better done through the static factory methods, so don't present the user with a pointless choice. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5982 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- src/java/com/threerings/util/DefaultMap.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/java/com/threerings/util/DefaultMap.java b/src/java/com/threerings/util/DefaultMap.java index 786e97aad..ab60f4b47 100644 --- a/src/java/com/threerings/util/DefaultMap.java +++ b/src/java/com/threerings/util/DefaultMap.java @@ -95,15 +95,6 @@ public class DefaultMap extends ForwardingMap return new DefaultMap(delegate, creator); } - /** - * Creates a default map backed by the supplied map using the supplied default creator. - */ - public DefaultMap (Map delegate, Function creator) - { - _delegate = delegate; - _creator = creator; - } - /** * Looks up the supplied key in the map, returning the value to which it is mapped. If the key * has no mapping, a default value will be obtained for the requested key and placed into the @@ -119,6 +110,15 @@ public class DefaultMap extends ForwardingMap return value; } + /** + * Creates a default map backed by the supplied map using the supplied default creator. + */ + protected DefaultMap (Map delegate, Function creator) + { + _delegate = delegate; + _creator = creator; + } + @Override // from ForwardingMap protected Map delegate() {