commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1136616 - /commons/sandbox/graph/trunk/src/test/java/org/apache/commons/graph/model/BaseLabeledEdge.java
Date Thu, 16 Jun 2011 19:20:04 GMT
Author: simonetripodi
Date: Thu Jun 16 19:20:03 2011
New Revision: 1136616

URL: http://svn.apache.org/viewvc?rev=1136616&view=rev
Log:
no needs to have Generics in test cases

Modified:
    commons/sandbox/graph/trunk/src/test/java/org/apache/commons/graph/model/BaseLabeledEdge.java

Modified: commons/sandbox/graph/trunk/src/test/java/org/apache/commons/graph/model/BaseLabeledEdge.java
URL: http://svn.apache.org/viewvc/commons/sandbox/graph/trunk/src/test/java/org/apache/commons/graph/model/BaseLabeledEdge.java?rev=1136616&r1=1136615&r2=1136616&view=diff
==============================================================================
--- commons/sandbox/graph/trunk/src/test/java/org/apache/commons/graph/model/BaseLabeledEdge.java
(original)
+++ commons/sandbox/graph/trunk/src/test/java/org/apache/commons/graph/model/BaseLabeledEdge.java
Thu Jun 16 19:20:03 2011
@@ -22,19 +22,18 @@ package org.apache.commons.graph.model;
 import static java.lang.String.format;
 
 import org.apache.commons.graph.LabeledEdge;
-import org.apache.commons.graph.LabeledVertex;
 
-public class BaseLabeledEdge<V extends LabeledVertex>
-    implements LabeledEdge<V>
+public class BaseLabeledEdge
+    implements LabeledEdge<BaseLabeledVertex>
 {
 
     private final String label;
 
-    private final V head;
+    private final BaseLabeledVertex head;
 
-    private final V tail;
+    private final BaseLabeledVertex tail;
 
-    public BaseLabeledEdge( String label, V head, V tail )
+    public BaseLabeledEdge( String label, BaseLabeledVertex head, BaseLabeledVertex tail
)
     {
         this.label = label;
         this.head = head;
@@ -52,7 +51,7 @@ public class BaseLabeledEdge<V extends L
     /**
      * {@inheritDoc}
      */
-    public V getHead()
+    public BaseLabeledVertex getHead()
     {
         return head;
     }
@@ -60,7 +59,7 @@ public class BaseLabeledEdge<V extends L
     /**
      * {@inheritDoc}
      */
-    public V getTail()
+    public BaseLabeledVertex getTail()
     {
         return tail;
     }
@@ -100,8 +99,7 @@ public class BaseLabeledEdge<V extends L
             return false;
         }
 
-        @SuppressWarnings( "unchecked" ) // etherogeneous xedges won't be tested
-        BaseLabeledEdge<V> other = (BaseLabeledEdge<V>) obj;
+        BaseLabeledEdge other = (BaseLabeledEdge) obj;
 
         if ( head == null )
         {



Mime
View raw message