Package edu.umd.cs.findbugs.graph
Class AbstractEdge<ActualEdgeType extends AbstractEdge<ActualEdgeType,VertexType>,VertexType extends AbstractVertex<ActualEdgeType,VertexType>>
- java.lang.Object
-
- edu.umd.cs.findbugs.graph.AbstractEdge<ActualEdgeType,VertexType>
-
- All Implemented Interfaces:
GraphEdge<ActualEdgeType,VertexType>,java.lang.Comparable<ActualEdgeType>
- Direct Known Subclasses:
CallGraphEdge,ConstraintEdge,Edge,InheritanceEdge,InterproceduralCallGraphEdge
public class AbstractEdge<ActualEdgeType extends AbstractEdge<ActualEdgeType,VertexType>,VertexType extends AbstractVertex<ActualEdgeType,VertexType>> extends java.lang.Object implements GraphEdge<ActualEdgeType,VertexType>
GraphEdge implementation for use with AbstractGraph.- Author:
- David Hovemeyer
- See Also:
GraphEdge,AbstractGraph,AbstractVertex
-
-
Constructor Summary
Constructors Constructor Description AbstractEdge(VertexType source, VertexType target)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(ActualEdgeType other)booleanequals(java.lang.Object o)intgetLabel()Get the integer label.VertexTypegetSource()Get the source vertex.VertexTypegetTarget()Get the target vertex.inthashCode()voidsetLabel(int label)Set the integer label.
-
-
-
Constructor Detail
-
AbstractEdge
public AbstractEdge(VertexType source, VertexType target)
Constructor.- Parameters:
source- the source vertex of the edgetarget- the target vertex of the edge
-
-
Method Detail
-
getSource
public VertexType getSource()
Description copied from interface:GraphEdgeGet the source vertex.- Specified by:
getSourcein interfaceGraphEdge<ActualEdgeType extends AbstractEdge<ActualEdgeType,VertexType>,VertexType extends AbstractVertex<ActualEdgeType,VertexType>>
-
getTarget
public VertexType getTarget()
Description copied from interface:GraphEdgeGet the target vertex.- Specified by:
getTargetin interfaceGraphEdge<ActualEdgeType extends AbstractEdge<ActualEdgeType,VertexType>,VertexType extends AbstractVertex<ActualEdgeType,VertexType>>
-
getLabel
public int getLabel()
Description copied from interface:GraphEdgeGet the integer label.- Specified by:
getLabelin interfaceGraphEdge<ActualEdgeType extends AbstractEdge<ActualEdgeType,VertexType>,VertexType extends AbstractVertex<ActualEdgeType,VertexType>>
-
setLabel
public void setLabel(int label)
Description copied from interface:GraphEdgeSet the integer label.- Specified by:
setLabelin interfaceGraphEdge<ActualEdgeType extends AbstractEdge<ActualEdgeType,VertexType>,VertexType extends AbstractVertex<ActualEdgeType,VertexType>>
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
compareTo
public int compareTo(ActualEdgeType other)
- Specified by:
compareToin interfacejava.lang.Comparable<ActualEdgeType extends AbstractEdge<ActualEdgeType,VertexType>>
-
-