forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anto...@apache.org
Subject svn commit: r123850 - /forrest/trunk/main/java/org/apache/forrest/conf/AntProperties.java
Date Sat, 01 Jan 2005 19:13:36 GMT
Author: antonio
Date: Sat Jan  1 11:13:33 2005
New Revision: 123850

URL: http://svn.apache.org/viewcvs?view=rev&rev=123850
Log:
Use Map.Entry
Modified:
   forrest/trunk/main/java/org/apache/forrest/conf/AntProperties.java

Modified: forrest/trunk/main/java/org/apache/forrest/conf/AntProperties.java
Url: http://svn.apache.org/viewcvs/forrest/trunk/main/java/org/apache/forrest/conf/AntProperties.java?view=diff&rev=123850&p1=forrest/trunk/main/java/org/apache/forrest/conf/AntProperties.java&r1=123849&p2=forrest/trunk/main/java/org/apache/forrest/conf/AntProperties.java&r2=123850
==============================================================================
--- forrest/trunk/main/java/org/apache/forrest/conf/AntProperties.java	(original)
+++ forrest/trunk/main/java/org/apache/forrest/conf/AntProperties.java	Sat Jan  1 11:13:33
2005
@@ -94,13 +94,11 @@
     }
 
     public synchronized void putAll(Map arg0) {
-        Set keys = arg0.keySet();
-        Iterator i = keys.iterator();
+        Iterator i = arg0.entrySet().iterator();
         while (i.hasNext()) {
-            String currentKey = i.next().toString();
-            this.put(currentKey, arg0.get(currentKey));
+            Map.Entry me = (Map.Entry)i.next();
+            this.put(me.getKey(), me.getValue());
         }
-
     }
 
     public synchronized Object setProperty(String name, String value) {
@@ -152,26 +150,19 @@
 
         void increment() {
             currentState++;
-            if (currentState > 3)
+            if (currentState > 3) {
                 currentState = 0;
+            }
 
         }
 
         boolean isStringToFilter() {
-            if (currentState == STRING_TO_FILTER) {
-                return true;
-            } else {
-                return false;
-            }
+            return (currentState == STRING_TO_FILTER);
         }
 
         boolean isStringNOTToFilter() {
-            if (currentState == STRING_NOT_TO_FILTER) {
-                return true;
-            } else {
-                return false;
-            }
+            return (currentState == STRING_NOT_TO_FILTER);
         }
     }
 
-}
\ No newline at end of file
+}

Mime
View raw message