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/02 23:30:32 UTC
svn commit: r1088132 -
/commons/proper/discovery/trunk/src/java/org/apache/commons/discovery/resource/names/DiscoverNamesInDictionary.java
Author: simonetripodi
Date: Sat Apr 2 21:30:32 2011
New Revision: 1088132
URL: http://svn.apache.org/viewvc?rev=1088132&view=rev
Log:
removed trailing spaces
Modified:
commons/proper/discovery/trunk/src/java/org/apache/commons/discovery/resource/names/DiscoverNamesInDictionary.java
Modified: commons/proper/discovery/trunk/src/java/org/apache/commons/discovery/resource/names/DiscoverNamesInDictionary.java
URL: http://svn.apache.org/viewvc/commons/proper/discovery/trunk/src/java/org/apache/commons/discovery/resource/names/DiscoverNamesInDictionary.java?rev=1088132&r1=1088131&r2=1088132&view=diff
==============================================================================
--- commons/proper/discovery/trunk/src/java/org/apache/commons/discovery/resource/names/DiscoverNamesInDictionary.java (original)
+++ commons/proper/discovery/trunk/src/java/org/apache/commons/discovery/resource/names/DiscoverNamesInDictionary.java Sat Apr 2 21:30:32 2011
@@ -28,10 +28,10 @@ import org.apache.commons.logging.Log;
/**
* Recover resources from a Dictionary. This covers Properties as well,
* since <code>Properties extends Hashtable extends Dictionary</code>.
- *
+ *
* The recovered value is expected to be either a <code>String</code>
* or a <code>String[]</code>.
- *
+ *
* @author Richard A. Sitze
*/
public class DiscoverNamesInDictionary
@@ -44,13 +44,13 @@ public class DiscoverNamesInDictionary
}
private Dictionary<String, String[]> dictionary;
-
+
/** Construct a new resource discoverer
*/
public DiscoverNamesInDictionary() {
setDictionary(new Hashtable<String, String[]>());
}
-
+
/** Construct a new resource discoverer
*/
public DiscoverNamesInDictionary(Dictionary<String, String[]> dictionary) {
@@ -67,11 +67,11 @@ public class DiscoverNamesInDictionary
public void setDictionary(Dictionary<String, String[]> table) {
this.dictionary = table;
}
-
+
public void addResource(String resourceName, String resource) {
addResource(resourceName, new String[]{ resource });
}
-
+
public void addResource(String resourceName, String[] resources) {
dictionary.put(resourceName, resources);
}
@@ -87,7 +87,7 @@ public class DiscoverNamesInDictionary
return new ResourceNameIterator() {
private int idx = 0;
-
+
public boolean hasNext() {
if (resources != null) {
while (idx < resources.length && resources[idx] == null) {
@@ -97,7 +97,7 @@ public class DiscoverNamesInDictionary
}
return false;
}
-
+
public String nextResourceName() {
return hasNext() ? resources[idx++] : null;
}