COLLECTIONS-215 - DefaultedMap clarify javadoc

git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@421727 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Stephen Colebourne 2006-07-13 23:09:11 +00:00
parent 667547d919
commit b1cd358495
2 changed files with 8 additions and 6 deletions

View File

@ -60,6 +60,8 @@ If this causes major headaches to anyone please contact commons-dev at jakarta.a
<center><h3>JAVADOC</h3></center>
<ul>
<li>IteratorChain - Clarify constructor behaviour</li>
<li>MuliKey - Spelling [COLLECTIONS-216]</li>
<li>DefaultedMap - Clarify transformer behaviour [COLLECTIONS-215]</li>
</ul>
</body>
</html>

View File

@ -1,5 +1,5 @@
/*
* Copyright 2005 The Apache Software Foundation
* Copyright 2005-2006 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -96,7 +96,7 @@ public class DefaultedMap
* The result will be returned as the result of the map get(key) method.
*
* @param map the map to decorate, must not be null
* @param factory the factory to use, must not be null
* @param factory the factory to use to create entries, must not be null
* @throws IllegalArgumentException if map or factory is null
*/
public static Map decorate(Map map, Factory factory) {
@ -114,14 +114,14 @@ public class DefaultedMap
* will be returned as the result of the map get(key) method.
*
* @param map the map to decorate, must not be null
* @param factory the factory to use, must not be null
* @param transformer the transformer to use as a factory to create entries, must not be null
* @throws IllegalArgumentException if map or factory is null
*/
public static Map decorate(Map map, Transformer factory) {
if (factory == null) {
public static Map decorate(Map map, Transformer transformer) {
if (transformer == null) {
throw new IllegalArgumentException("Transformer must not be null");
}
return new DefaultedMap(map, factory);
return new DefaultedMap(map, transformer);
}
//-----------------------------------------------------------------------