Package com.jgalgo.graph
Class NoSuchEdgeException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- java.lang.IllegalArgumentException
-
- com.jgalgo.graph.NoSuchEdgeException
-
- All Implemented Interfaces:
Serializable
public class NoSuchEdgeException extends IllegalArgumentException
Exception thrown when an edge is not found in a graph.- Author:
- Barak Ugav
- See Also:
NoSuchVertexException
, Serialized Form
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static NoSuchEdgeException
ofEdge(int edgeId)
Create a new exception of a missing edge by itsint
identifier.static NoSuchEdgeException
ofEdge(Object edgeId)
Create a new exception of a missing edge by its identifier.static NoSuchEdgeException
ofIndex(int edgeIdx)
Create a new exception of a missing edge by its index.-
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 NoSuchEdgeException ofIndex(int edgeIdx)
Create a new exception of a missing edge by its index.The index of an edge is the index of the edge in the
IndexGraph
of the graph, accessed byGraph.indexGraph()
. In case the graph is an index graph, and identifier and the index of an edge are the same.- Parameters:
edgeIdx
- the index of the missing edge- Returns:
- the exception
-
ofEdge
public static NoSuchEdgeException ofEdge(Object edgeId)
Create a new exception of a missing edge by its identifier.- Parameters:
edgeId
- the identifier of the missing edge- Returns:
- the exception
-
ofEdge
public static NoSuchEdgeException ofEdge(int edgeId)
Create a new exception of a missing edge by itsint
identifier.This is a specification of
ofEdge(Object)
forIntGraph
.- Parameters:
edgeId
- the identifier of the missing edge- Returns:
- the exception
-
-