Package edu.uci.ics.jung.graph.util
Class Graphs.SynchronizedDirectedGraph<V,E>
- java.lang.Object
-
- edu.uci.ics.jung.graph.util.Graphs.SynchronizedAbstractGraph<V,E>
-
- edu.uci.ics.jung.graph.util.Graphs.SynchronizedDirectedGraph<V,E>
-
- All Implemented Interfaces:
DirectedGraph<V,E>
,Graph<V,E>
,Hypergraph<V,E>
,java.io.Serializable
- Direct Known Subclasses:
Graphs.SynchronizedForest
- Enclosing class:
- Graphs
static class Graphs.SynchronizedDirectedGraph<V,E> extends Graphs.SynchronizedAbstractGraph<V,E> implements DirectedGraph<V,E>, java.io.Serializable
-
-
Field Summary
-
Fields inherited from class edu.uci.ics.jung.graph.util.Graphs.SynchronizedAbstractGraph
delegate
-
-
Constructor Summary
Constructors Modifier Constructor Description private
SynchronizedDirectedGraph(DirectedGraph<V,E> delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description V
getDest(E directed_edge)
Ifdirected_edge
is a directed edge in this graph, returns the destination; otherwise returnsnull
.V
getSource(E directed_edge)
Ifdirected_edge
is a directed edge in this graph, returns the source; otherwise returnsnull
.boolean
isDest(V vertex, E edge)
Returnstrue
ifvertex
is the destination ofedge
.boolean
isSource(V vertex, E edge)
Returnstrue
ifvertex
is the source ofedge
.-
Methods inherited from class edu.uci.ics.jung.graph.util.Graphs.SynchronizedAbstractGraph
addEdge, addEdge, addEdge, addEdge, addVertex, containsEdge, containsVertex, degree, findEdge, findEdgeSet, getDefaultEdgeType, getEdgeCount, getEdgeCount, getEdges, getEdges, getEdgeType, getEndpoints, getIncidentCount, getIncidentEdges, getIncidentVertices, getInEdges, getNeighborCount, getNeighbors, getOpposite, getOutEdges, getPredecessorCount, getPredecessors, getSuccessorCount, getSuccessors, getVertexCount, getVertices, inDegree, isIncident, isNeighbor, isPredecessor, isSuccessor, outDegree, removeEdge, removeVertex
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface edu.uci.ics.jung.graph.Graph
addEdge, addEdge, getEndpoints, getInEdges, getOpposite, getOutEdges, getPredecessorCount, getPredecessors, getSuccessorCount, getSuccessors, inDegree, isPredecessor, isSuccessor, outDegree
-
Methods inherited from interface edu.uci.ics.jung.graph.Hypergraph
addEdge, addEdge, addVertex, containsEdge, containsVertex, degree, findEdge, findEdgeSet, getDefaultEdgeType, getEdgeCount, getEdgeCount, getEdges, getEdges, getEdgeType, getIncidentCount, getIncidentEdges, getIncidentVertices, getNeighborCount, getNeighbors, getVertexCount, getVertices, isIncident, isNeighbor, removeEdge, removeVertex
-
-
-
-
Constructor Detail
-
SynchronizedDirectedGraph
private SynchronizedDirectedGraph(DirectedGraph<V,E> delegate)
-
-
Method Detail
-
getDest
public V getDest(E directed_edge)
Description copied from interface:Graph
Ifdirected_edge
is a directed edge in this graph, returns the destination; otherwise returnsnull
. The destination of a directed edged
is defined to be the vertex incident tod
for whichd
is an incoming edge.directed_edge
is guaranteed to be a directed edge if itsEdgeType
isDIRECTED
.- Specified by:
getDest
in interfaceGraph<V,E>
- Specified by:
getDest
in interfaceHypergraph<V,E>
- Overrides:
getDest
in classGraphs.SynchronizedAbstractGraph<V,E>
- Parameters:
directed_edge
- the edge whose destination is to be returned- Returns:
- the destination of
directed_edge
if it is a directed edge in this graph, ornull
otherwise - See Also:
Graph.getDest(java.lang.Object)
-
getSource
public V getSource(E directed_edge)
Description copied from interface:Graph
Ifdirected_edge
is a directed edge in this graph, returns the source; otherwise returnsnull
. The source of a directed edged
is defined to be the vertex for whichd
is an outgoing edge.directed_edge
is guaranteed to be a directed edge if itsEdgeType
isDIRECTED
.- Specified by:
getSource
in interfaceGraph<V,E>
- Specified by:
getSource
in interfaceHypergraph<V,E>
- Overrides:
getSource
in classGraphs.SynchronizedAbstractGraph<V,E>
- Parameters:
directed_edge
- the edge whose source is to be returned- Returns:
- the source of
directed_edge
if it is a directed edge in this graph, ornull
otherwise - See Also:
Graph.getSource(java.lang.Object)
-
isDest
public boolean isDest(V vertex, E edge)
Description copied from interface:Graph
Returnstrue
ifvertex
is the destination ofedge
. Equivalent togetDest(edge).equals(vertex)
.- Specified by:
isDest
in interfaceGraph<V,E>
- Overrides:
isDest
in classGraphs.SynchronizedAbstractGraph<V,E>
- Parameters:
vertex
- the vertex to be queriededge
- the edge to be queried- Returns:
true
iffvertex
is the destination ofedge
- See Also:
Graph.isDest(java.lang.Object, java.lang.Object)
-
isSource
public boolean isSource(V vertex, E edge)
Description copied from interface:Graph
Returnstrue
ifvertex
is the source ofedge
. Equivalent togetSource(edge).equals(vertex)
.- Specified by:
isSource
in interfaceGraph<V,E>
- Overrides:
isSource
in classGraphs.SynchronizedAbstractGraph<V,E>
- Parameters:
vertex
- the vertex to be queriededge
- the edge to be queried- Returns:
true
iffvertex
is the source ofedge
- See Also:
Graph.isSource(java.lang.Object, java.lang.Object)
-
-