abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r441618 - in /incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server: target/Target.java util/RegexTargetResolver.java
Date Fri, 08 Sep 2006 19:11:48 GMT
Author: jmsnell
Date: Fri Sep  8 12:11:48 2006
New Revision: 441618

URL: http://svn.apache.org/viewvc?view=rev&rev=441618
Log:
Make Target implement Iterable to provide another way of getting to the parsed target tokens

Modified:
    incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/target/Target.java
    incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/util/RegexTargetResolver.java

Modified: incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/target/Target.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/target/Target.java?view=diff&rev=441618&r1=441617&r2=441618
==============================================================================
--- incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/target/Target.java
(original)
+++ incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/target/Target.java
Fri Sep  8 12:11:48 2006
@@ -19,7 +19,7 @@
 
 import org.apache.abdera.protocol.server.util.ResourceType;
 
-public interface Target {
+public interface Target extends Iterable<String> {
 
   ResourceType getResourceType();
   

Modified: incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/util/RegexTargetResolver.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/util/RegexTargetResolver.java?view=diff&rev=441618&r1=441617&r2=441618
==============================================================================
--- incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/util/RegexTargetResolver.java
(original)
+++ incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/util/RegexTargetResolver.java
Fri Sep  8 12:11:48 2006
@@ -18,6 +18,7 @@
 package org.apache.abdera.protocol.server.util;
 
 import java.util.HashMap;
+import java.util.Iterator;
 import java.util.Map;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
@@ -104,6 +105,10 @@
     
     public boolean hasValue(int token) {
       return getValue(token) != null;
+    }
+
+    public Iterator<String> iterator() {
+      return new TargetIterator(this);
     }
   }
   



Mime
View raw message