Module org.jhotdraw8.graph
Package org.jhotdraw8.graph
Class IndexedDirectedGraphDirectedGraphFacade
java.lang.Object
org.jhotdraw8.graph.IndexedDirectedGraphDirectedGraphFacade
- All Implemented Interfaces:
BareDirectedGraph<Integer,,Integer> BareDirectedVertexGraph<Integer>,DirectedGraph<Integer,Integer>
public class IndexedDirectedGraphDirectedGraphFacade
extends Object
implements DirectedGraph<Integer,Integer>
Provides a
DirectedGraph facade for an IndexedDirectedGraph.-
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionintReturns the number of arrows.Returns the next vertex associated with the specified vertex and outgoing arrow index.getNextArrow(@NonNull Integer v, int index) Returns the arrow data associated with the specified vertex and outgoing arrow index.intReturns the number of next vertices at the specified vertex.getVertex(int index) Gets the vertex data at the specified index.Returns all vertices.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jhotdraw8.graph.DirectedGraph
findArrow, findIndexOfNext, getArrows, getArrows, getNextArc, getNextArcs, getNextArrows, getNextVertices, getVertexCount, isNext, searchNextVertices, searchNextVertices
-
Constructor Details
-
IndexedDirectedGraphDirectedGraphFacade
-
-
Method Details
-
getArrowCount
public int getArrowCount()Description copied from interface:DirectedGraphReturns the number of arrows.- Specified by:
getArrowCountin interfaceDirectedGraph<Integer,Integer> - Returns:
- arrow count
-
getVertex
Description copied from interface:DirectedGraphGets the vertex data at the specified index.- Specified by:
getVertexin interfaceDirectedGraph<Integer,Integer> - Parameters:
index- an index- Returns:
- vertex data
-
getNext
Description copied from interface:BareDirectedVertexGraphReturns the next vertex associated with the specified vertex and outgoing arrow index.- Specified by:
getNextin interfaceBareDirectedVertexGraph<Integer>- Parameters:
v- a vertexindex- index of outgoing arrow- Returns:
- the next vertex
- See Also:
-
getNextArrow
Description copied from interface:BareDirectedGraphReturns the arrow data associated with the specified vertex and outgoing arrow index.- Specified by:
getNextArrowin interfaceBareDirectedGraph<Integer,Integer> - Parameters:
v- a vertexindex- index of outgoing arrow- Returns:
- the next arrow data
- See Also:
-
getNextCount
Description copied from interface:BareDirectedVertexGraphReturns the number of next vertices at the specified vertex.This number is the same as the number of outgoing arrows at the specified vertex.
- Specified by:
getNextCountin interfaceBareDirectedVertexGraph<Integer>- Parameters:
v- a vertex- Returns:
- the number of next vertices
-
getVertices
Description copied from interface:BareDirectedVertexGraphReturns all vertices.- Specified by:
getVerticesin interfaceBareDirectedVertexGraph<Integer>- Returns:
- a set view on all vertices
-