There's no especial need to disallow use of the constructor.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5954 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -93,6 +93,15 @@ public class DefaultMap<K, V> extends ForwardingMap<K, V>
|
||||
return new DefaultMap<K, V>(delegate, creator);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a default map backed by the supplied map using the supplied default creator.
|
||||
*/
|
||||
public DefaultMap (Map<K, V> delegate, Creator<K, V> creator)
|
||||
{
|
||||
_delegate = delegate;
|
||||
_creator = creator;
|
||||
}
|
||||
|
||||
@Override // from Map
|
||||
public V get (Object key)
|
||||
{
|
||||
@@ -105,12 +114,6 @@ public class DefaultMap<K, V> extends ForwardingMap<K, V>
|
||||
return value;
|
||||
}
|
||||
|
||||
protected DefaultMap (Map<K, V> delegate, Creator<K, V> creator)
|
||||
{
|
||||
_delegate = delegate;
|
||||
_creator = creator;
|
||||
}
|
||||
|
||||
@Override // from ForwardingMap
|
||||
protected Map<K, V> delegate()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user