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 NoSuchVertexExceptionofIndex(int vertexIdx) Create a new exception of a missing vertex by its index.static NoSuchVertexExceptionofVertex(int vertexId) Create a new exception of a missing vertex by itsintidentifier.static NoSuchVertexExceptionCreate 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
IndexGraphof 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 itsintidentifier.This is a specification of
ofVertex(Object)forIntGraph.- Parameters:
vertexId- the identifier of the missing vertex- Returns:
- the exception
-