Package com.jgalgo.graph
Class NoSuchVertexException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- com.jgalgo.graph.NoSuchVertexException
-
- All Implemented Interfaces:
Serializable
public class NoSuchVertexException extends RuntimeException
Exception thrown when a vertex is not found in a graph.- Author:
- Barak Ugav
- See Also:
NoSuchEdgeException, Serialized Form
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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 NoSuchVertexExceptionofVertex(Object vertexId)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 Detail
-
ofIndex
public static NoSuchVertexException ofIndex(int vertexIdx)
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
public static NoSuchVertexException ofVertex(Object vertexId)
Create a new exception of a missing vertex by its identifier.- Parameters:
vertexId- the identifier of the missing vertex- Returns:
- the exception
-
ofVertex
public static NoSuchVertexException ofVertex(int vertexId)
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
-
-