You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by si...@apache.org on 2011/04/05 21:44:39 UTC

svn commit: r1089179 - /commons/proper/discovery/trunk/src/java/org/apache/commons/discovery/resource/names/DiscoverMappedNames.java

Author: simonetripodi
Date: Tue Apr  5 19:44:39 2011
New Revision: 1089179

URL: http://svn.apache.org/viewvc?rev=1089179&view=rev
Log:
added missing javadocs

Modified:
    commons/proper/discovery/trunk/src/java/org/apache/commons/discovery/resource/names/DiscoverMappedNames.java

Modified: commons/proper/discovery/trunk/src/java/org/apache/commons/discovery/resource/names/DiscoverMappedNames.java
URL: http://svn.apache.org/viewvc/commons/proper/discovery/trunk/src/java/org/apache/commons/discovery/resource/names/DiscoverMappedNames.java?rev=1089179&r1=1089178&r2=1089179&view=diff
==============================================================================
--- commons/proper/discovery/trunk/src/java/org/apache/commons/discovery/resource/names/DiscoverMappedNames.java (original)
+++ commons/proper/discovery/trunk/src/java/org/apache/commons/discovery/resource/names/DiscoverMappedNames.java Tue Apr  5 19:44:39 2011
@@ -40,27 +40,49 @@ public class DiscoverMappedNames
     implements ResourceNameDiscover
 {
     private static Log log = LogFactory.getLog(DiscoverMappedNames.class);
+
+    /**
+     * Sets the {@code Log} for this class.
+     *
+     * @param _log This class {@code Log}
+     */
     public static void setLog(Log _log) {
         log = _log;
     }
 
-    private final Map<String, String[]> mapping = new Hashtable<String, String[]>();  // String name ==> String[] newNames
+    /**
+     * The String name ==> String[] newNames mapping
+     */
+    private final Map<String, String[]> mapping = new Hashtable<String, String[]>();
 
-    /** Construct a new resource discoverer
+    /**
+     * Construct a new resource discoverer
      */
     public DiscoverMappedNames() {
     }
 
+    /**
+     * Maps a name to another name.
+     *
+     * @param fromName The name has to be mapped
+     * @param toName The mapping target
+     */
     public void map(String fromName, String toName) {
         map(fromName, new String[]{ toName });
     }
 
+    /**
+     * Maps a name to multiple names.
+     *
+     * @param fromName The name has to be mapped
+     * @param toNames The mapping targets
+     */
     public void map(String fromName, String [] toNames) {
         mapping.put(fromName, toNames);
     }
 
     /**
-     * @return Enumeration of ResourceInfo
+     * {@inheritDoc}
      */
     @Override
     public ResourceNameIterator findResourceNames(final String resourceName) {