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
public class NoSuchVertexException extends IllegalArgumentException
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 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
ofVertex(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
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
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 itsint
identifier.This is a specification of
ofVertex(Object)
forIntGraph
.- Parameters:
vertexId
- the identifier of the missing vertex- Returns:
- the exception
-
-