commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1141840 - in /commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph: Path.java model/InMemoryPath.java
Date Fri, 01 Jul 2011 06:58:22 GMT
Author: simonetripodi
Date: Fri Jul  1 06:58:22 2011
New Revision: 1141840

URL: http://svn.apache.org/viewvc?rev=1141840&view=rev
Log:
just offered iterables on vertices/edges

Modified:
    commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/Path.java
    commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/model/InMemoryPath.java

Modified: commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/Path.java
URL: http://svn.apache.org/viewvc/commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/Path.java?rev=1141840&r1=1141839&r2=1141840&view=diff
==============================================================================
--- commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/Path.java (original)
+++ commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/Path.java Fri Jul 
1 06:58:22 2011
@@ -19,7 +19,6 @@ package org.apache.commons.graph;
  * under the License.
  */
 
-import java.util.List;
 
 /**
  * A {@code Path} in a {@link Graph} is a sequence of {@link Vertex} such that from each
of its vertices there is an
@@ -53,7 +52,7 @@ public interface Path<V extends Vertex, 
      *
      * @return a list of Vertices, in order as they go from Start to End.
      */
-    List<V> getVertices();
+    Iterable<V> getVertices();
 
     /**
      * Returns the <i>order</i> of a Graph (the number of Vertices);
@@ -69,7 +68,7 @@ public interface Path<V extends Vertex, 
      *
      * @return a list of Edges which comprise the path.
      */
-    List<E> getEdges();
+    Iterable<E> getEdges();
 
     /**
      * Returns the <i>size</i> of a Graph (the number of Edges)

Modified: commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/model/InMemoryPath.java
URL: http://svn.apache.org/viewvc/commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/model/InMemoryPath.java?rev=1141840&r1=1141839&r2=1141840&view=diff
==============================================================================
--- commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/model/InMemoryPath.java
(original)
+++ commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/model/InMemoryPath.java
Fri Jul  1 06:58:22 2011
@@ -23,7 +23,6 @@ import static java.lang.String.format;
 import static java.util.Collections.unmodifiableList;
 
 import java.util.LinkedList;
-import java.util.List;
 
 import org.apache.commons.graph.Edge;
 import org.apache.commons.graph.Path;
@@ -92,7 +91,7 @@ public class InMemoryPath<V extends Vert
     /**
      * {@inheritDoc}
      */
-    public List<V> getVertices()
+    public Iterable<V> getVertices()
     {
         return unmodifiableList( vertices );
     }
@@ -118,7 +117,7 @@ public class InMemoryPath<V extends Vert
     /**
      * {@inheritDoc}
      */
-    public List<E> getEdges()
+    public Iterable<E> getEdges()
     {
         return unmodifiableList( edges );
     }



Mime
View raw message