Package edu.uci.ics.jung.graph.util
Class Graphs.UnmodifiableDirectedGraph<V,E>
- java.lang.Object
-
- edu.uci.ics.jung.graph.util.Graphs.UnmodifiableAbstractGraph<V,E>
-
- edu.uci.ics.jung.graph.util.Graphs.UnmodifiableDirectedGraph<V,E>
-
- All Implemented Interfaces:
DirectedGraph<V,E>,Graph<V,E>,Hypergraph<V,E>,java.io.Serializable
- Enclosing class:
- Graphs
static class Graphs.UnmodifiableDirectedGraph<V,E> extends Graphs.UnmodifiableAbstractGraph<V,E> implements DirectedGraph<V,E>, java.io.Serializable
-
-
Field Summary
-
Fields inherited from class edu.uci.ics.jung.graph.util.Graphs.UnmodifiableAbstractGraph
delegate
-
-
Constructor Summary
Constructors Modifier Constructor Description privateUnmodifiableDirectedGraph(DirectedGraph<V,E> delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description VgetDest(E directed_edge)Ifdirected_edgeis a directed edge in this graph, returns the destination; otherwise returnsnull.VgetSource(E directed_edge)Ifdirected_edgeis a directed edge in this graph, returns the source; otherwise returnsnull.booleanisDest(V vertex, E edge)Returnstrueifvertexis the destination ofedge.booleanisSource(V vertex, E edge)Returnstrueifvertexis the source ofedge.-
Methods inherited from class edu.uci.ics.jung.graph.util.Graphs.UnmodifiableAbstractGraph
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
-
UnmodifiableDirectedGraph
private UnmodifiableDirectedGraph(DirectedGraph<V,E> delegate)
-
-
Method Detail
-
getDest
public V getDest(E directed_edge)
Description copied from interface:GraphIfdirected_edgeis a directed edge in this graph, returns the destination; otherwise returnsnull. The destination of a directed edgedis defined to be the vertex incident todfor whichdis an incoming edge.directed_edgeis guaranteed to be a directed edge if itsEdgeTypeisDIRECTED.- Specified by:
getDestin interfaceGraph<V,E>- Specified by:
getDestin interfaceHypergraph<V,E>- Overrides:
getDestin classGraphs.UnmodifiableAbstractGraph<V,E>- Parameters:
directed_edge- the edge whose destination is to be returned- Returns:
- the destination of
directed_edgeif it is a directed edge in this graph, ornullotherwise - See Also:
Graph.getDest(java.lang.Object)
-
getSource
public V getSource(E directed_edge)
Description copied from interface:GraphIfdirected_edgeis a directed edge in this graph, returns the source; otherwise returnsnull. The source of a directed edgedis defined to be the vertex for whichdis an outgoing edge.directed_edgeis guaranteed to be a directed edge if itsEdgeTypeisDIRECTED.- Specified by:
getSourcein interfaceGraph<V,E>- Specified by:
getSourcein interfaceHypergraph<V,E>- Overrides:
getSourcein classGraphs.UnmodifiableAbstractGraph<V,E>- Parameters:
directed_edge- the edge whose source is to be returned- Returns:
- the source of
directed_edgeif it is a directed edge in this graph, ornullotherwise - See Also:
Graph.getSource(java.lang.Object)
-
isDest
public boolean isDest(V vertex, E edge)
Description copied from interface:GraphReturnstrueifvertexis the destination ofedge. Equivalent togetDest(edge).equals(vertex).- Specified by:
isDestin interfaceGraph<V,E>- Overrides:
isDestin classGraphs.UnmodifiableAbstractGraph<V,E>- Parameters:
vertex- the vertex to be queriededge- the edge to be queried- Returns:
trueiffvertexis 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:GraphReturnstrueifvertexis the source ofedge. Equivalent togetSource(edge).equals(vertex).- Specified by:
isSourcein interfaceGraph<V,E>- Overrides:
isSourcein classGraphs.UnmodifiableAbstractGraph<V,E>- Parameters:
vertex- the vertex to be queriededge- the edge to be queried- Returns:
trueiffvertexis the source ofedge- See Also:
Graph.isSource(java.lang.Object, java.lang.Object)
-
-