java.lang.Object
org.jhotdraw8.graph.IndexedBidiGraphBidiGraphFacade
- All Implemented Interfaces:
BareBidiGraph<Integer,,Integer> BareDirectedGraph<Integer,,Integer> BareDirectedVertexGraph<Integer>,BidiGraph<Integer,,Integer> DirectedGraph<Integer,Integer>
Provides a
BidiGraph facade for an IndexedBidiGraph.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the index of vertexuin the list of next vertices ofvif an arrow fromvtouexists.intReturns the index of vertexuin the list of previous vertices ofvif an arrow fromutovexists.intReturns 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.Returns the previous vertex associated with the specified vertex and incoming arrow index.getPrevArrow(@NonNull Integer vertex, int index) Returns the arrow data associated with the specified vertex and the specified incoming arrow index.intgetPrevCount(@NonNull Integer vertex) Returns the number of previous 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.BidiGraph
getPrevArc, getPrevArcs, getPrevArrows, getPrevVertices, isPrev, searchPrevVertices, searchPrevVerticesMethods inherited from interface org.jhotdraw8.graph.DirectedGraph
findArrow, getArrows, getArrows, getNextArc, getNextArcs, getNextArrows, getNextVertices, getVertexCount, isNext, searchNextVertices, searchNextVertices
-
Constructor Details
-
IndexedBidiGraphBidiGraphFacade
-
-
Method Details
-
getArrowCount
public int getArrowCount()Description copied from interface:DirectedGraphReturns the number of arrows.- Specified by:
getArrowCountin interfaceDirectedGraph<Integer,Integer> - Returns:
- arrow count
-
getPrev
Description copied from interface:BareBidiGraphReturns the previous vertex associated with the specified vertex and incoming arrow index.- Specified by:
getPrevin interfaceBareBidiGraph<Integer,Integer> - Parameters:
vertex- a vertexindex- index of incoming arrow- Returns:
- the previous vertex
- See Also:
-
getPrevArrow
Description copied from interface:BareBidiGraphReturns the arrow data associated with the specified vertex and the specified incoming arrow index.- Specified by:
getPrevArrowin interfaceBareBidiGraph<Integer,Integer> - Parameters:
vertex- a vertexindex- index of incoming arrow- Returns:
- the arrow
- See Also:
-
getPrevCount
Description copied from interface:BareBidiGraphReturns the number of previous vertices at the specified vertex.This number is the same as the number of incoming arrows at the specified vertex.
- Specified by:
getPrevCountin interfaceBareBidiGraph<Integer,Integer> - Parameters:
vertex- a vertex- Returns:
- the number of previous vertices
-
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:
-
findIndexOfPrev
Description copied from interface:BidiGraphReturns the index of vertexuin the list of previous vertices ofvif an arrow fromutovexists.- Specified by:
findIndexOfPrevin interfaceBidiGraph<Integer,Integer> - Parameters:
v- a vertexu- a vertex- Returns:
- index of vertex
uor a value < 0
-
findIndexOfNext
Description copied from interface:DirectedGraphReturns the index of vertexuin the list of next vertices ofvif an arrow fromvtouexists.- Specified by:
findIndexOfNextin interfaceDirectedGraph<Integer,Integer> - Parameters:
v- a vertexu- a vertex- Returns:
- index of vertex
uor a value < 0
-
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
-