Package com.jgalgo.graph
Class NoSuchVertexException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.IllegalArgumentException
com.jgalgo.graph.NoSuchVertexException
- All Implemented Interfaces:
Serializable
Exception thrown when a vertex is not found in a graph.
- Author:
- Barak Ugav
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic NoSuchVertexException
ofIndex
(int vertexIdx) Create a new exception of a missing vertex by its index.static NoSuchVertexException
ofVertex
(int vertexId) Create a new exception of a missing vertex by itsint
identifier.static NoSuchVertexException
Create a new exception of a missing vertex by its identifier.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Method Details
-
ofIndex
Create a new exception of a missing vertex by its index.The index of a vertex is the index of the vertex in the
IndexGraph
of the graph, accessed byGraph.indexGraph()
. In case the graph is an index graph, and identifier and the index of a vertex are the same.- Parameters:
vertexIdx
- the index of the missing vertex- Returns:
- the exception
-
ofVertex
Create a new exception of a missing vertex by its identifier.- Parameters:
vertexId
- the identifier of the missing vertex- Returns:
- the exception
-
ofVertex
Create a new exception of a missing vertex by itsint
identifier.This is a specification of
ofVertex(Object)
forIntGraph
.- Parameters:
vertexId
- the identifier of the missing vertex- Returns:
- the exception
-