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/16 21:20:04 UTC
svn commit: r1136616 -
/commons/sandbox/graph/trunk/src/test/java/org/apache/commons/graph/model/BaseLabeledEdge.java
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 )
{