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/06/11 15:53:49 UTC
svn commit: r1134637 -
/commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/Graph.java
Author: simonetripodi
Date: Sat Jun 11 13:53:48 2011
New Revision: 1134637
URL: http://svn.apache.org/viewvc?rev=1134637&view=rev
Log:
typing Vertices/Edges of a graph would simplify users understanding which kind of data the Graph stores
Modified:
commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/Graph.java
Modified: commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/Graph.java
URL: http://svn.apache.org/viewvc/commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/Graph.java?rev=1134637&r1=1134636&r2=1134637&view=diff
==============================================================================
--- commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/Graph.java (original)
+++ commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/Graph.java Sat Jun 11 13:53:48 2011
@@ -23,28 +23,28 @@ import java.util.Set;
* called {@link Edge}s or arcs, of certain entities called {@link Vertex} or node.
* As in mathematics, an {@link Edge} {@code (x,y)} is said to point or go from {@code x} to {@code y}.
*/
-public interface Graph
+public interface Graph<V extends Vertex, E extends Edge>
{
/**
* getVertices - Returns the total set of Vertices in the graph.
*/
- Set getVertices();
+ Set<V> getVertices();
/**
* getEdges - Returns the total set of Edges in the graph.
*/
- Set getEdges();
+ Set<V> getEdges();
/**
* getEdges( Vertex ) - This method will return all edges which touch this
* vertex.
*/
- Set getEdges(Vertex v);
+ Set<E> getEdges(Vertex v);
/**
* getVertices( Edge ) - This method will return the set of Verticies on
* this Edge. (2 for normal edges, > 2 for HyperEdges.)
*/
- Set getVertices(Edge e);
+ Set<E> getVertices(Edge e);
}